title: ngOnInit vs constructor in Angular
body: <p>From here: <a href="https://www.angularjswiki.com/angular/what-is-the-difference-between-constructor-and-ngoninit-in-angular/#ngoninit-vs-constructor-in-angular" rel="nofollow noreferrer">https://www.angularjswiki.com/angular/what-is-the-difference-between-constructor-and-ngoninit-in-angular/#ngoninit-vs-constructor-in-angular</a></p>
  
  <blockquote>
    <p><em>ngOnInit:</em> Invoked by Angular when component is initialized<br>
      <em>constructor:</em> Constructor is automatically called at the time of creating object of the class</p>
  </blockquote>
  
  <p>How do we know when component is initialized? Which function is responsible for this?</p>
  
  <blockquote>
    <p><em>ngOnInit:</em> Everything is ready at the time of invocation.<br>
       <em>constructor:</em> Not everything in component is initialized at the time of invocation</p>
  </blockquote>
  
  <p>What is "everything" that is ready at the time of invocation?</p>
  
  <p><a href="https://angular.io/api/core/OnInit" rel="nofollow noreferrer">https://angular.io/api/core/OnInit</a></p>
  
  <blockquote>
    <p>A callback method that is invoked immediately after the <strong><em>default change detector has checked the directive's data-bound properties for the first time</em></strong>, <strong><em>and before any of the view or content children have been checked.</em></strong> It is invoked only once when the directive is instantiated.</p>
  </blockquote>
  
  <p>Also, please explain the bold lines in the above quote.</p>