Why doesn't AppComponent have a default ngOnInit function?

When building an Angular project using the CLI, the root component - AppComponent does not have an ngOnInit block, but every other generated component has an ngOnInit block. Is it wrong to have ngOnInit in the root component?

+3


source to share





All Articles