TypeError Observable.concat is not a function

Joaquin Diaz

I need concat an array of observables and then subscribe to them

there's the function

let arrayObservable: Array<Observable<any>> = new Array<Observable<any>>();

products
 .forEach(product => {
    arrayObservable.push(this.service.delete(product));
});
Observable.concat(arrayObservable)
 .subscribe(response => {
    console.log(response)
})
John Churchill

concat and merge are static functions in rxjs. They are not on Observable.

Example:

import { concat, of} from "rxjs";
const n1 = of(1,2,3);
const n2 = of(4,5,6);
const cc = concat(n1, n2);
cc.subscribe(d=> console.log(d));

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

TypeError: objF.concat is not a function

TypeError: prevUserFavourites.concat is not a function

Sequelize error - "TypeError: hooks.concat is not a function"

TypeError: _rxjs.Observable.fromPromise is not a function

Vuetify - TypeError: Vue.observable is not a function

Uncaught TypeError: Observable_1.Observable.from is not a function

Concat and return Observable

Observable - map / concat

Observable.concat with Exception

how to concat an observable properly

RxJS observable concat not working

Rxjs concat Observable with condition

RXJS 6.3.3 Ionic TypeError: Observable.combineLatest is not a function

TypeError: rxjs__WEBPACK_IMPORTED_MODULE_2__.Observable.throw is not a function

Retry an Observable in a merge or concat sequence

Identify specific observable of a concat in subscription

standalone concat does not return an observable

CONCAT to concat two $_GET function

How to fix 'Unhandled Rejection (TypeError): state.categories.concat is not a function' in react?

TypeError: Observable_1.Observable.fromEvent is not a function in ng2-bs3-modal/ng2-bs3-modal module

ERROR TypeError: tags.tagName.indexOf is not a function: Angular: Filter Observable<SomeObject[ ]> provided with a substring as a parameter

Angular2 Http with RXJS Observable TypeError: this.http.get(...).map(...).catch is not a function

Getting TypeError pipe is not a function while testing angular component using observable with declarative approach using async

RxJava concat when first Observable is empty

RXJS make an observable dispatch after another (not concat)

How to concat two observable arrays into a single array?

Undefined is not a function with concat

Using concat function in Pandas

Concat - Undefined Function