I have been trying to insert some md-chip elements in my project. All I get is "md-chip-list
is not a known element".
HTML
:
<md-chip-list>
<md-chip *ngFor="let dependency of externalDependencies" color="primary" class="chip">
{{dependency.name}}
</md-chip>
</md-chip-list>
I have imported MdChipsModule, as I have seen in other answers:
import { MdChipsModule } from '@angular/material';
The code works if I leave out the md-chip-list
tag, but the format is not as expected. I am new to Angular Material, so I would really appreciate some help.
The problem was module not included in the imports
.
npm install --save @angular/material
In code
import { MdChipsModule } from '@angular/material';
@NgModule({
...
imports: [MdChipsModule],
...
})
export class PizzaPartyAppModule { }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With