ts1206 decorators are not valid here, Angular 2

前端 未结 1 1163
孤独总比滥情好
孤独总比滥情好 2021-02-11 12:25

I started to program Angular 2 and I stuck with an error:

ts1206 decorators are not valid here

@Component({   //  ts1206 de         


        
1条回答
  •  醉梦人生
    2021-02-11 12:52

    The Decorators must come directly before an exported class for example:

    @Component({
        ...
    })
    export class someComponent{}
    

    this goes the same for @Pipe @Directive @Injectable and @NgModule

    0 讨论(0)
提交回复
热议问题