title: Uncaught Error: Can't resolve all parameters for AppComponent: (?). for abstract class
body: <p>I am a newbie in angular. Here I was playing with abstract and interfaces. I am setting properties in abstract class but its giving Uncaught error. I tried many combo fo this. But not getting why its coming. Following is the code</p>
  
  <pre><code>import { Component, OnInit } from '@angular/core';
  
  export interface IHero {
    id: number;
    name?: string
  }
  
  export abstract class  Hero implements IHero{
    id: number;
    name: string;
  
    constructor(hero: IHero){
      this.id = hero.id;
      this.name = hero.name;
    }
  }
  
  
  @Component({
    selector: 'app-root',
    templateUrl: './app.component.html',
    styleUrls: ['./app.component.css']
  })
  export class AppComponent extends Hero{
    hero: IHero;
    title = 'Tour  of Heroes';
    data = { id: 1, name: 'nitu' };
  
    constructor(data){
      super(data);
    }
  
    ngOnInit(){
      console.log(this.id);
      console.log(this.name);
    }
  }
  </code></pre>
  
  <p>Any help will be appreciated. Thanks in advance.</p>