Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // form reference
- @ViewChild('form') form;
- // reference to update observable
- update$: Observable<any> ;
- ngOnInit() {
- Observable.fromEvent(this.form.nativeElement, 'submit')
- .do(() => {
- // get values from form
- })
- .skipUntil(this.update$)
- .mergeMap(() => {
- this.update$ = this.datasource.update(..);
- return this.update$;
- })
- .subscribe()
- }
- You provided 'undefined' where a stream was expected.
Add Comment
Please, Sign In to add comment