ng-smart-input

0.0.5 • Public • Published

Alt text

ng-smart-input

Introduction

Fancy performance input box with autocomplete

Installing

  • npm install -g gulp gulp-cli install global cli dependencies
  • npm install to install dependencies

Usage

  • <script type='text/javascript' src='ng-smart-input/dist/app.min.js'></script>
  • angular.module('myApp', ['ng-smart-input'])
  • provide a config object

Config Options

  • id: give your input a unique id (mandatory)
  • placeholders: list of texts to be displayed as placeholder (optional)
  • delay: wait time until suggestions appear (optional)
  • max: maximum number of suggestions to be shown
  • suggestions: search space

Config Example

this.smartInputConfig = {
    id: 'fancy-input',
    placeholders: [
        'fancy smart input...',
        'your search text goes here'
    ],
    delay: 500,
    suggestions: [
        'angular', 
        'angoala', 
        'kola', 
        'ant', 
        'angry',
        'anthem',
        'apple',
        'ak',
        'car',
        'arse',
        'anker',
        'antler',
        'obama',
        'omaha',
        'alabama'
    ]
};

Package Sidebar

Install

npm i ng-smart-input

Weekly Downloads

0

Version

0.0.5

License

Apache-2.0

Last publish

Collaborators

  • kod88vn