Skip to content

A generic angularjs directive that uses the jquery autocomplete API

License

Notifications You must be signed in to change notification settings

tkoseoglu/watg-angular-autocomplete

Repository files navigation

watg-angular-autocomplete

WATG auto-complete directrive for angularjs web applications. Based on jquery-ui autocomplete API.

Getting Started

bower install watg-angular-autocomplete --save

Required Files

bower_components/watg-angular-autocomplete/dist/js/watg-angular-autocomplete.min.js
bower_components/watg-angular-autocomplete/dist/css/watg-angular-autocomplete.min.css

Inject module in your app

angular.module('myApp', ['...','watgAutocompleteModule']);

Example

Step 1. Directive Set-up

<watg-autocomplete
config="autoCompleteStaffConfig"
ng-model="yourSelectedItem.FullName"
selected-item="yourSelectedItem"/>

Step 2. Configuration

$scope.autoCompleteStaffConfig: {
    url: "http://...to your source of data",
    displayValue: 'FullName', //the piece of data in your source that shows
    delay: 200,  //jqueryUI API
    minLength: 1 //jqueryUI API
};
$scope.yourSelectedItem={};

About

A generic angularjs directive that uses the jquery autocomplete API

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages