Angular 2 | Directives Argument of type '{}' is not assignable to

后端 未结 4 1583
挽巷
挽巷 2020-12-02 22:53

I am noob with Angular 2. I am doing YouTube tutorials, but every tutorial have the directives: part where i am stuck.

app.component.ts

4条回答
  •  -上瘾入骨i
    2020-12-02 23:35

    If you are using RC6, then only you should do following,

    import { HeaderComponent } from './components/header/header.component' //<----added this line
    
    @NgModule({
      imports:      [ BrowserModule ],
      declarations: [ AppComponent,HeaderComponent],                       //<----added HeaderComponent
      bootstrap:    [ AppComponent ]
    })
    

提交回复
热议问题