Please add a @Pipe/@Directive/@Component annotation. Error

后端 未结 11 2235
滥情空心
滥情空心 2021-02-06 21:29

I am stuck in a situation here. I am getting an error like this.

 compiler.es5.js:1694 Uncaught Error: Unexpected value \'LoginComponent\' declared by the modul         


        
11条回答
  •  醉话见心
    2021-02-06 22:16

    If you are exporting another class in that module, make sure that it is not in between @Component and your ClassComponent. For example:

    @Component({ ... })
    
    export class ExampleClass{}
    
    export class ComponentClass{}  --> this will give this error.
    

    FIX:

    export class ExampleClass{}
    
    @Component ({ ... })
    
    export class ComponentClass{}
    

提交回复
热议问题