Why is the module of angular still not found when it is introduced globally?

clipboard.png

clipboard.png

Uncaught Error: Template parse errors:
"md-toolbar" is not a known element:
1. If "md-toolbar" is an Angular component, then verify that it is part of this module.

git: https://github.com/yyccQQu/0405newNg/tree/dev/my-app

you don't have the md-toolbar component, so you can't use it as a tag


  • first of all, you didn't introduce MatToolbarModule globally.
  • secondly, CoreModule does not import MatToolbarModule , .

I see that you have SharedModule in your code repository. Import all the things of Mat directly into SharedModule and then export them, and then import them directly into SharedModule .

Menu