Adding a directive to an angular 2 component

I recently created a simple project using angular 2. When I try to add a directory component to app.component, there is a red underline for the "directive" property. Will someone tell me what's wrong here?

enter image description here

+4
source share
1 answer

Directives, components and pipes should be added to

@NgModule({
  declarations: [...]

since RC.6

directives, but pipeswas deleted from @Component().

+7
source

Source: https://habr.com/ru/post/1668230/


All Articles