Can't bind to 'matMenuTriggerFor' since it isn't a known property of 'button'

前端 未结 6 1273
执笔经年
执笔经年 2021-01-03 17:15

I\'m getting following error when I try to test an angular component:

Error while running jest tests:

Can\'t bind to \'matMenuTriggerFor\' since it i         


        
6条回答
  •  耶瑟儿~
    2021-01-03 17:53

    Import MatMenuModule in your feature Module OR the Module where this component resides in.

     import { MatMenuModule} from '@angular/material/menu';
    

    and

    imports: [
      MatMenuModule
    ]
    

提交回复
热议问题