This is a fork of Daryl Rowland's angucomplete (https://github.com/darylrowland/angucomplete) with a bit of tweaks such as:
- change long attribute names to hyphenated ones
- coding style similar to angular standard
- refactored in general
- more test coverage
To see a demo go here: http://ghiden.github.io/angucomplete-alt
- Show just a title, a title and a description or a title, description and image in your autocomplete list
- Deliberately minimally styled so you can customise it to your heart's content!
- Reads JSON data and allows you to specify which fields to use for display
- Simple setup - e.g. to pull data from a server, just set the url parameter
- Request format function: if you need to tweak data before you send to your search API, you can set your own format function. Search query goes through your function and gets sent to your API.
- Response format function: if you need to tweak response from the server before it gets processed by the directive, you can set your own format function. Raw HTTP response goes through your function. Thanks to @nekcih for proposing this feature.
- Clear on selection: when you select an item, input field is cleared.
- Blur event handling, thanks to @leejsinclair
- Override suggestions
- You can either bind an object or callback function
- bind an object: it works as regular two-way-data-binding
- callback function: when a selection is made by user, this callback is called with the selected object. Thanks to @nekcih for proposing this feature.
- Required support: It is a bit different from ng-required which becomes valid when there is any character in input field. This required becomes valid when a selection is made. Class name is "autocomplete-required" and customizable. Thanks to @alindber for the initial idea.
- Custom texts for "Searching..." and "No results found", thanks to @vhuerta for this idea.
- Be able to set initial value. This becomes handy if you use this directive for updating existing model.
- Be able to set a error callback for ajax request
- Add a callback for tracking input changes. Thanks to @urecio for the initial idea.