kintela
kintela

Reputation: 1323

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

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

Upvotes: 0

Views: 22

Answers (1)

MGX
MGX

Reputation: 3531

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.

Upvotes: 1

Related Questions