Reputation: 29109
I'm trying to use angular material design (2.0.0-beta2), but I cannot get it to work. For example, if I try to use
<md-input-container>
<input mdInput name="value">
</md-input-container>
With the following added to app.module.ts
import {MaterialModule} from '@angular/material';
@NgModule({
...
imports: [ MaterialModule, ...],
...
})
But I get the following error:
'md-input-container' is not a known element:
Note: The component using the above code lives somewhere in my app a couple of modules deep!
When I also add MdInputContainer
to the declarations I get a different error:
Type MdInputContainer is part of the declarations of 2 modules: MdInputModule and AppModule!
I think I'm getting close, but I'm missing something, any help would be appreciated
Upvotes: 0
Views: 292
Reputation: 990
In order to use angular material components you need to import the MaterialModule
in the module you are using it. Importing it only from parent modules won't recognize it.
Upvotes: 1