Angular2 – catch/subscribe to (click) event in dynamically added HTML

Declarative event binding is only supported in static HTML in a components template. If you want to subscribe to events of elements dynamically added, you need to do it imperatively. elementRef.nativeElement.querySelector(…).addEventListener(…) or similar. If you want to be WebWorker-safe, you can inject the Renderer constructor(private elementRef:ElementRef, private renderer:Renderer) {} and use instead this.renderer.listen(this.elementRef.nativeElement, ‘click’, (event) … Read more

RxJS Observables nested subscriptions?

As mentioned in comments, you are looking for the flatMap operator. You can find more details in previous answers : How to do the chain sequence in rxjs Why do we need to use flatMap? Your example would read as : this.returnsObservable1(…) .flatMap(success => this.returnsObservable2(…)) .flatMap(success => this.returnsObservable3(…)) .subscribe(success => {(…)});

Subscribe is deprecated: Use an observer instead of an error callback

subscribe isn’t deprecated, only the variant you’re using is deprecated. In the future, subscribe will only take one argument: either the next handler (a function) or an observer object. So in your case you should use: .subscribe({ next: this.handleUpdateResponse.bind(this), error: this.handleError.bind(this) }); See these GitHub issues: https://github.com/ReactiveX/rxjs/pull/4202 https://github.com/ReactiveX/rxjs/issues/4159