Using a dataset, with a function as source for computing suggestions.
Option selectOnAutocomplete=true is used to trigger select event on autocomplete with TAB key.
In this example the directive will create a Bloodhound engine for suggestions from prefetch and remote urls, with options passed in. (see the code)
Option clear=true is used to clear input after selection.
Try to type first the letter 'u' , you will see 5 (the limit specifies) items from prefetch data
Then if you type a 'n' you will see 3 items + 1 (last is from remote data)
Clear the input.
And type first the letter 'ut' , you will see 2 items from remote data