Typeahead directive implemented with pure Angular