Angular 2 Material Chips Directive/Component with no dependencies required. This is a Material Chips Directive/Component for Angular 2.
http://shootermv.github.io/angular2-material-chips/examples/index.html
npm i --save angular2-material-chips
- Use it in your HTML elements, for example:
<material-chips [(ngModel)]="tags" ></material-chips>
- Add in your app.component.ts:
export class AppComponent {
tags:string[] = ['AngularJS','Angluar2']
}
- Add MaterialChipsModule in your app.module.ts:
import {MaterialChipsModule} from 'angular2-material-chips';
@NgModule({
...
imports: [BrowserModule, MaterialChipsModule, FormsModule]
})
#Build & Test
git clone https://github.com/shootermv/angular2-material-chips.git
npm install
cd angular2-material-chips
gulp
gulp copylib
cd examples-webpack
npm install
npm start