title: Nested model in angular2
body: <p>I have the parent user model like below:</p>
  
  <p>user.ts</p>
  
  <pre><code>   export class User {
             employeeModel: employee = new Employee();
     } 
  </code></pre>
  
  <p>and I have a child model named employee.ts</p>
  
  <pre><code>   export class Employeee {
             name: string ;
             age: string ;
             position: string ;
     } 
  </code></pre>
  
  <p>In my component.ts I instantiate the parent model like:</p>
  
  <p><code>model: User = new User();</code></p>
  
  <p>And in my template: </p>
  
  <pre><code>&lt;input type="text"  [(ngModel)]="model.employeeModel.name"&gt;
  </code></pre>
  
  <p>Using that codes I get :
        <code>Cannot read property 'name' of undefined</code>.</p>
  
  <p>What is wrong with my codes? </p>