O'Reilly logo

Angular 2 Cookbook by Matt Frisbie

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Building a fully featured AutoComplete with Observables

RxJS Observables afford you a lot of firepower, and it would be a shame to miss out on them. A huge library of transformations and utilities are baked right in that allow you to elegantly architect complex portions of your application in a reactive fashion.

In this recipe, you'll take a naïve autocomplete form and build a robust set of features to enhance behavior and performance.

Note

The code, links, and a live example of this are available at http://ngcookbook.herokuapp.com/8629/.

Getting ready

Begin with the following application:

[app/app.module.ts] import {NgModule} from '@angular/core'; import {BrowserModule} from '@angular/platform-browser'; import {SearchComponent} from './search.component'; ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required