Typeahead

Simple Typeahead

A typeahead example that gets values from a static string[]

  • debounceTime operator
  • kicks in only if 2+ characters typed
  • limits to 10 results

Model: {{ model | json }}

Wikipedia search

A typeahead example that gets values from the WikipediaService

  • remote data retrieval
  • debounceTime operator
  • do operator
  • distinctUntilChanged operator
  • switchMap operator
  • catch operator to display an error message in case of connectivity issue
searching...

Model: {{ modelWiki | json }}

Formatted results

A typeahead example that uses a formatter function for string results

Model: {{ modelFormat | json }}

Template for results

A typeahead example that uses custom template for results display and uses object as a model

{{ r.name}}

Model: {{ modelTemp | json }}