Reactive-Extensions / RxJS

The Reactive Extensions for JavaScript
http://reactivex.io
Other
19.49k stars 2.1k forks source link

Behaviour subject called twice so backend service called twice ? #1523

Open suresh2018 opened 6 years ago

suresh2018 commented 6 years ago

storeFillterData: Subject = new BehaviorSubject(null); getFillterData() { return this.storeFillterData; }

updateFillterData(data: object) { this.storeFillterData.next(data); }

zjuasmn commented 6 years ago

BehaviorSubject will emit its current value once subscribed, maybe you would want to add .skip(1) to it

suresh2018 commented 6 years ago

Thank you very much

On Nov 6, 2017 5:00 PM, "asmn" notifications@github.com wrote:

BehaviorSubject will emit its current value once subscribed, maybe you would want to add .skip(1) to it

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Reactive-Extensions/RxJS/issues/1523#issuecomment-342122179, or mute the thread https://github.com/notifications/unsubscribe-auth/Ac20CIhLE1Hyhj1x_mR7v0ZgCnhWpalwks5szu3rgaJpZM4QK7Fw .

suresh2018 commented 6 years ago

Can you share the example of using skip behavior subject

On Nov 6, 2017 8:43 PM, "suresh kumar" sureshq17@gmail.com wrote:

Thank you very much

On Nov 6, 2017 5:00 PM, "asmn" notifications@github.com wrote:

BehaviorSubject will emit its current value once subscribed, maybe you would want to add .skip(1) to it

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Reactive-Extensions/RxJS/issues/1523#issuecomment-342122179, or mute the thread https://github.com/notifications/unsubscribe-auth/Ac20CIhLE1Hyhj1x_mR7v0ZgCnhWpalwks5szu3rgaJpZM4QK7Fw .

suresh2018 commented 6 years ago

Not working