0

I'm working on an Angular2 application using @angular/material 2.0.0-beta.2 and I am trying to use Chips, but I get 'md-chips' is not a known element. Here is what I have done:

component.html:

<md-chips ng-model="keywords" readonly="false" placeholder="Enter a keyword"></md-chips>

module.ts

import { MaterialModule } from '@angular/material';
import 'hammerjs';
...
@NgModule({
imports: [
    productRouting,
    SharedModule,
    Select2Module,
    MaterialModule.forRoot()
],
...

if I use some other material component like

<md-toolbar color="primary"><span>GameViewer</span></md-toolbar>

I'll have no problem, therefor I don't think I have a problem with importing the material module.

P.S. I already read these:

Daniel
  • 3,541
  • 3
  • 33
  • 46
Kavoos
  • 377
  • 4
  • 19

1 Answers1

2

For Material2 the components are md-chip and md-chip-list.

<md-chip-list>
  <md-chip>Papadum</md-chip>
  <md-chip>Naan</md-chip>
  <md-chip>Dal</md-chip>
</md-chip-list>

The docs can be found here.

JayChase
  • 11,174
  • 2
  • 43
  • 52
  • Thanks. So [Angular Material](https://material.angularjs.org/1.1.2/demo/chips) is for AngularJS? I just noticed the "js" in the link! – Kavoos Mar 27 '17 at 14:23
  • 1
    @Kavoos yep they have only recently put up the new site. There is quite a bit on GitHub too https://github.com/angular/material2. – JayChase Mar 27 '17 at 14:26