title: Input value is not passed to child component angular5?
body: <p>I have two components dashboard &amp; skills, and i want to pass the type in dashboard to be used in skill. But getting error undefined.</p>
  
  <p>Dashboard Component:</p>
  
  <pre><code>export class DashboardComponent implements OnInit {
    type: string;
    constructor() { }
  
    ngOnInit() {
      this.type = "Agent";
    }
  </code></pre>
  
  <p>And the Skill component is:</p>
  
  <pre><code>export class SkillComponent implements OnInit{
   @Input() type: string;  
   constructor() { }
    ngOnInit() {
    console.log(this.type);
  }
  </code></pre>
  
  <p>Dashboard component template:</p>
  
  <pre><code>&lt;div class="container"&gt;
    &lt;div class="row"&gt;
      &lt;app-skill-list type="type"&gt;&lt;/app-skill-list&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>