Home > Enterprise >  I don't know how to use angular material controls in my application
I don't know how to use angular material controls in my application

Time:10-21

I have installed angular material

enter image description here

I have created Material Module

enter image description here

I have imported this module in app module

enter image description here

But in any template in which I insert a control I always get the same error of "is not a known element:"

For example, here I need a date picker

enter image description here

Any idea, please?

Thanks

CodePudding user response:

You should avoid creating a dedicated material module for tree shaking.

But the issue is probably that you only imported the modules, and did not export them.

Try adding an exports array to your material module.

  • Related