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

后端 未结 11 2283
滥情空心
滥情空心 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:27

    In my case I mistakenly added this:

    @Component({
        selector: 'app-some-item',
        templateUrl: './some-item.component.html',
        styleUrls: ['./some-item.component.scss'],
        providers: [ConfirmationService]
    })
    
    declare var configuration: any;
    

    while the correct form is:

    declare var configuration: any;
    
    @Component({
        selector: 'app-some-item',
        templateUrl: './some-item.component.html',
        styleUrls: ['./some-item.component.scss'],
        providers: [ConfirmationService]
    })    
    

提交回复
热议问题