ngx-adibro-reusable-autocomplete
v5.0.1
Published
This is an angular component for autocomplete.
Downloads
1
Maintainers
Readme
ngx-adibro-reusable-autocomplete for Angular 7+
This is an angular component for autocomplete.
For demos please visit
Installation
npm install --save [email protected]
Usage
Inside app.module file import the module:
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { NgxAdibroReusableAutocompleteModule } from 'ngx-adibro-reusable-autocomplete';
@NgModule({
declarations: [
...
],
imports: [
... ,
BrowserModule,
FormsModule,
NgxAdibroReusableAutocompleteModule,
...
],
providers: [ ... ],
bootstrap: [...]
})
export class AppModule { }
In your HTML file you can do:
<ngx-adibro-reusable-autocomplete
[items]="items"
[(ngModel)]="myval"
(ngModelChange) = "changedVal($event)"
placeholder="placeholder"
></ngx-adibro-reusable-autocomplete
>
In your TS file:
myval: any;
public items = [
"Eve",
"Charles",
"Tracey",
...
]
changedVal($event){
console.log($event);
}
We support:
- items must be an array of strings
- currently only strings are supported
That's it
Have fun !!!