title: How to pass data from parrent constructor to child component in angular 2
body: <p>I have a angular 2 page where i need to show 2 different components using same array of data from external API. Parent is regular component, and child is shared among several other components using same functionality.</p>
  
  <p>In parent component class i have output property declared: </p>
  
  <pre><code>public weatherList: WeatherForecast[];
  @Output() public weatherListData: any;
  </code></pre>
  
  <p>Inside constructor of parent component, i populate <code>weatherListData</code> property with data from an external API</p>
  
  <pre><code>    http.get(url)
          .subscribe(result =&gt; {
              this.weatherList= result.json() as WeatherForecast[];
              this.weatherListData = this.weatherList;
          });
  </code></pre>
  
  <p>and i'm using it inside parent template with success, something like: <code>{{ weatherList.someValue }}</code></p>
  
  <p>Also, inside parent component template, i have a call to a child component </p>
  
  <pre><code>&lt;daily-temperature-chart [weatherListData]='weatherListData'&gt;&lt;/daily-temperature-chart&gt;
  </code></pre>
  
  <p>In child component class i have declared property </p>
  
  <pre><code>@Input() weatherListData: any;
  </code></pre>
  
  <p>but, when i try to access <code>weatherListData</code> property in constructor, or init of child component, i get undefined result.</p>
  
  <p><strong>EDIT</strong>: I have played with console.log() and noticed that child component Constructor and OnInit() methods return before http.get() from parent component. Maybe this is problem, but i'm still new to angular and can't tell.</p>
  
  <p>Can someone point me how to solve this? </p>