Sharing Top Content from the Angular-sphere.

Taking advantage of Observables in Angular 2

  • The template simply binds to keyup and calls search(term.value) leveraging Angular 2’s awesome template ref feature.
  • We inject our WikipediaService and expose it’s functionality via a search method to the template.
  • To unveil such super powers we first need to get an Observable that carries the search term that the user types in. Instead of manually binding to the keyup event we use ngFormControl from within our template and set it to the name “term” .

Read the full article, click here.


@SplinterCode: “Taking advantage of Observables in Angular 2 via @thoughtram

#angularjs #angular2”


Angular 2 favors Observables over Promises when it comes to async. The rational behind this decision may not be obvious right from the start. There is definitely a learning curve to master Observables in all their beauty. In this article we like to explore some practical advantages with Observables for server communication.


Taking advantage of Observables in Angular 2

Comments are closed, but trackbacks and pingbacks are open.