How to get only latest value from subscribe in angular 4?
this.AbcSrvice.value.subscribe(data => {console.log(data)})
How to get only latest value from subscribe in angular 4?
this.AbcSrvice.value.subscribe(data => {console.log(data)})
Use the last operator : https://www.learnrxjs.io/operators/filtering/last.html
import { last } 'rxjs/operators';
this.AbcSrvice.value
.pipe(last())
.subscribe(data => {console.log(data)});