Observables provide support for passing messages between publishers and subscribers in your application. In the example below parent.component contains the child.component which binds to members counterSubject, countObservable$ and foo declared in the parent.
In the interpolated html the | async sets up and destroys the subscription for you. It is common practice for the observable to be suffixed with $, so here the observable is countObservable$
parent.component
1 | parent.component.ts |
1 | parent-search.component.html |
child.component
1 | child-control-search.component.ts |
1 | child.component.html |