Angular Material component not working: 'mat-option' is not a known element

后端 未结 3 1550
被撕碎了的回忆
被撕碎了的回忆 2021-01-17 10:58

I am trying to add angular material component. but the component did not work properly. that error said

Uncaught Error: Template parse errors: \'mat-option\         


        
3条回答
  •  孤城傲影
    2021-01-17 11:44

    You need to import MatSelectModule,

    imports: [
        BrowserModule,
        FormsModule,
        HttpModule,
        MaterialModule,
        MatSelectModule,
        //..Other modules here
    ],
    

提交回复
热议问题