India
venkat@smartinfo.in

Component is not part of any NgModule or the module has not been imported into your module

Why this error ??  : This type of errors will come in Angular Components. Suppose if you using the angular component which is not declared in that module. 

Component is not part of any NgModule

Explanation :  The above picture shows the following console error Component ContactComponent is not part of any NgModule or the module has not been imported into your module.

Here ContactComponent is not declared in appModule.ts (please check the following picture ContactComponent is not declared)

module has not been imported into your module

Solution : Declare the ContactComponent in  app.module declarations array. please check the below image.

Component is not part of any NgModule or the module has not been imported into your module

Leave a Reply

Your email address will not be published. Required fields are marked *

RSS
Follow by Email
LinkedIn
Share