nx-predictive-input
v1.0.2
Published
This library was generated with [Nx](https://nx.dev).
Downloads
32
Maintainers
Readme
nx-predictive-input
This library was generated with Nx.
Description
Could not find any similar Angular component for this purpose, so I created my own. This is a standalone component which accepts @Input() predictions as a simple array of strings and works fine with ReactiveFormsModule.
Showcase
Install
Run npm install nx-predictive-input@latest
to install this library.
Usage
Import component like this:
import { NxPredictiveInputComponent } from "nx-predictive-input";
In your component, please create array of countries like this:
@Component({...}) export class MyComponent { countries = ["Bosnia and Herzegovina"]; }
And use it in HTML like this:
<input-predictive [predictions]="countries"></input-predictive>
Running unit tests
Run nx test nx-predictive-input
to execute the unit tests.