Angular-2 : Copy one object to another
<p>I wants to copy my class object to temp object.</p>

<p><strong>Class properties:</strong></p>

<pre><code>export class PageModel {       
    AppID: any = null;
    ParentID: any = null;
    Type: any = null;
    Order: any = null;
    IsEnabled: boolean = false;
    View: any = null;
    Toolbars: any = null;
    Attachments: any = null;
} 
</code></pre>

<p><strong>My initial object :</strong> </p>

<pre><code>pageModel : PageModel =new PageModel();
pageModel.Type='New';
pageModel.Order=1;
</code></pre>

<p>Now i wants to assign this updated object to any <strong>temp object</strong>, this temp object is going to assign as <strong>model in one of the form</strong>, so only on Save button click i wants to update my main object.</p>

<p>I just need help, how to copy main object to temp one.</p>