Simple dual list box component to use with your Angular 5 app, along with Angular Material and Flex layout
Simple dual list box component to use with your Angular 5 app, along with Angular Material and Flex layout.
You will need:
If you don't have these in your package.json, they will be installed when you install this package, just make sure you have the correct versions.
To install this library, run:
$ npm install @blandium/ngx-material-dual-listbox --save
and then from your Angular AppModule
:
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AppComponent } from './app.component';
// Import the module
import { NgxMaterialDualListboxModule } from '@blandium/ngx-material-dual-listbox';
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
// Add the module in the impots
NgxMaterialDualListboxModule
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
Once the library is imported, you can use the components, directives and pipes in your Angular application:
<ngx-material-duallistbox [items]="items" [descProperty]="'description'" [idProperty]="'id'">
</ngx-material-duallistbox>
If you want to use the component with material icons, make sure you have included them in your project. One way to do that is to include this in your intex.html:
<link href="https://fonts.googleapis.com/icon?family=Material+Icons"
rel="stylesheet">
MIT Blandi Alcani