0.1.8 • Published 6 years ago

autocomplete-module v0.1.8

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

autocompmodule

Installation

To install this library, run:

$ npm install autocomplete-module --save

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 { AutocompleteModule } from 'autocomplete-module';

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,

    // Specify your library as an import
    AutocompleteModule
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }

and then from your AppComponent

import { Component } from '@angular/core';
import { AutocompleteComponent } from './modules/autocomplete';

@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.css']
})
export class AppComponent {
  title = 'app';
  options: any;

  constructor() {
    /**
     * This is how you input the options to Autocomplete
    */
    this.options = [
      {
        name: 'ny',
        value: 'New York'
      },
      {
        name: 'nyc',
        value: 'New Jersy'
      }
    ];
  }
  onOptionSelection(selectOptions) {
  }
}



Once the module is imported, you can use this component in your Angular application:

```html
<autocomplete [options]="options" (onOptionSelection)="onOptionSelection()"></autocomplete>

License

MIT © Sudhakar Pilavadi

0.1.8

6 years ago

0.1.7

6 years ago

0.1.6

6 years ago

0.1.5

6 years ago

0.1.4

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago