title: How to get data from object which is input from parent component.
body: <p>I have parent component which is getting data object from service and stored it in value: item.</p>
  
  <p>Next, by html binding I sending it to child component:</p>
  
  <pre><code>&lt;app-employee-form *ngIf="!showLoader" [employee]="item"&gt;&lt;/app-employee-form&gt;
  </code></pre>
  
  <p>In child component I have input annotation and I got employee value:</p>
  
  <pre><code>@Input() employee: Employee;
  </code></pre>
  
  <p>And in this point, my problem start.
  When I try to use this data on:</p>
  
  <pre><code>ngOnInit() {
  console.log('Test -&gt;', this.employee);
  console.log('Test for name -&gt; ', this.employee.name);}
  </code></pre>
  
  <p>I have in a console:</p>
  
  <pre><code>Test -&gt; {"id":1,"name":"Wanda","surname":"Smith","type":"sdfkmsd","selected":false
  Test for name -&gt;  undefined
  </code></pre>
  
  <p>I don't understand why I can't get data from property name (or any other property in this case). Can somebody help me?</p>