1.1.0 • Published 6 years ago

gv-checkedlistbox v1.1.0

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

gv-checkedlistbox

Installation

To install this library, run:

$ npm install gv-checkedlistbox --save

Consuming your library

Once you have published your library to npm, you can import your library in any Angular application by running:

$ npm install gv-checkedlistbox

and then from your Angular AppModule:

import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core'; 
import { AppComponent } from './app.component'; 
// Import your library
import { GvCheckedListBoxModule } from 'gv-checkedlistbox';

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule, 
    // Specify your library as an import
    GvCheckedListBoxModule
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }

Once your library is imported, you can use its components, directives and pipes in your Angular application:

<!-- You can now use your library component in your html -->
<gv-checkedlistbox [data]="mydata" [(ngModel)]="selectedIds">
</gv-checkedlistbox>

your data formation should be with id & name property.
eg:
mydata = [
    { id: 1, name: "Test 1" },
    { id: 2, name: "Test 2" },
    { id: 3, name: "Test 3" },
    { id: 4, name: "Test 4" },
    { id: 5, name: "Test 5" },
    { id: 6, name: "Test 6" },
  ]  

##DEMO https://plnkr.co/edit/nHRS76?p=preview

Development

To generate all *.js, *.d.ts and *.metadata.json files:

$ npm run build

To lint all *.ts files:

$ npm run lint

License

MIT © Venkatesan