Package Exports
- @nglibrary/ngx-choosy
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@nglibrary/ngx-choosy) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
NGX-CHOOSY is a very simple and highly configurable select box / dropdown library for Angular 4+.
custom templates powerful search Easy styling async loading ...
Installation
Download the library from npm or yarn,
yarn add @nglibrary/ngx-choosy // or
npm install @nglibrary/ngx-choosyInclude in your app/shared module
import { NgModule } from '@angular/core';
import { NgxChoosyModule } from '@nglibrary/ngx-choosy'; // <--
import { AppComponent } from './app.component';
@NgModule({
imports: [
AppComponent,
...
NgxChoosyModule.forRoot()
],
declarations: [ /* ... */ ],
providers: [ /* ... */ ],
bootstrap: [AppComponent]
})
export class AppModule {}Add choosy directive to any input element
// in component
import { Component } from '@angular/core';
@Component({
selector: 'my-app',
templateUrl: './app.component.html',
styleUrls: ['./app.component.scss']
})
export class AppComponent {
names: string[];
constructor() { }
ngOnInit() {
this.names = ['John','Peter','Mustaq','Hannah','Willams'];
}
}<!-- in template -->
<input type="text" placeholder="select name"
choosySingleSelect
[options]="names"
[config]="{}"
(choosy)="anyMethod($event)"
>