I recently created a simple project using angular 2. When I try to add a directive component to the app.component, there's a red underline for 'directives' property. Anybody tell me what's wrong here?
1 Answer
Directives, components, and pipes need to be added to
@NgModule({
declarations: [...]
since RC.6
directives, and pipes was removed from @Component() back then.
6 Comments
Rozane
@echonax - Is this the official one?
Rozane
@Günter - Thank you very much. I didn't know that. Sorry I can't vote up any of your answers since I don't have 15 reputations.
eko
@Rozane yes it is the official changelog. If Günter's answer helped you, you should mark his answer as accepted :-) meta.stackexchange.com/a/135826
Günter Zöchbauer
@Rozane yes, it's the official. No worries.
|
