Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Md-chip-list is not a known element

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.

like image 572
ultibaws Avatar asked Dec 18 '22 06:12

ultibaws


1 Answers

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 { }
like image 133
Vamshi Avatar answered Jan 07 '23 08:01

Vamshi