dance-planner-typeahead
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

Typeahead

Usage

Execute the following command ng add ngx-bootstrap --component typeahead

Add the following in your html

<lib-ng-simple-typeahead [placeHolder]="placeHolder" [items]="dances" [inputStyle]="inputStyle" (itemSelected)="onItemSelected($event)"></lib-ng-simple-typeahead>

Add the following in your ...component.ts

  public placeHolder = 'Start Typing ...';

  public selectedItem = 'Bachata';

  public dances: string[] = [
    'Bachata',
    'Salsa',
    'Merengue'
  ];

  public onItemSelected($event) {
    this.selectedItem = $event;
    alert(this.selectedItem);
  }

Add the following in your app.module.ts

  import { BrowserModule } from '@angular/platform-browser';
  import { NgModule } from '@angular/core';
  import { AppComponent } from './app.component';
  import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
  import { NgSimpleTypeaheadModule } from 'ng-simple-typeahead';

  imports: [
    NgSimpleTypeaheadModule,
    BrowserModule,
    BrowserAnimationsModule

Readme

Keywords

none

Package Sidebar

Install

npm i dance-planner-typeahead

Weekly Downloads

1

Version

1.0.1

License

none

Unpacked Size

65 kB

Total Files

23

Last publish

Collaborators

  • danceplanner