title: When to create constructor in Angular2 typescript?
body: <p>Here are some example constructors from the <a href="https://angular.io/docs/ts/latest/">Angular 2 docs</a>:</p>
  
  <pre><code>export class AppComponent implements OnInit {
      title = 'Tour of heroes';
      heroes: Hero[];
      selectedHero: Hero;
  
      constructor(private heroService: HeroService) { }
  
      getHeroes() {
          this.HeroService.getHeroes().then(heroes =&gt; this.heroes = heroes);
      }
  }
  </code></pre>
  
  <p>and...</p>
  
  <pre><code>class Car {
      constructor(engine, tires, doors){
          this.engine = engine;
          this.tires = tires;
          this.doors = doors;
      }
  }
  </code></pre>
  
  <p>I don't understand Why and When to create a <code>constructor()</code> in angular 2 /typescript (I've read the official documentation where they create a constructor for Dependency Injection and for Services).</p>