Typeahead using Angular JS and Bootstrap
Typeahead using Angular JS and Bootstrap
Creating a simple type-ahead or autocomplete using Angular JS and Bootstrap.
"Typeahead is a AngularJS version of Bootstrap v2's typeahead plugin. This directive can be used to quickly create elegant typeaheads with any form text input.
It is very well integrated into AngularJS as it uses a subset of the select directive syntax, which is very flexible.
This directive works with promises, meaning you can retrieve matches using the $http service with minimal effort."
Use bootstrap type-ahead into the input element.
For example:
- In the above example uib-typeahead is a bootstrap directive, through which we retrieve data by a http request.
- The typeahead-on-select directive is used to indicate what function has to be done while selecting on the suggested result.
html:
script:
Click here to download working sample
Reference:
[1] Angular Bootstrap Typeahead
Comments
Post a Comment