I am working with a variable called
returnDate: Observable<string>
, which is assigned a value from another function of type Observable. Here is an example of how the function looks:
getDates(): Observable<string> {
return new Observable((observer) => {
observer.next(moment(this.data.Date).format('DD MMM'));}
});
}
My question is, how can I determine if the value of returnDate has changed or if the observable has received a different value? Essentially, I am updating dates using these observables and need to track if a specific object (this.data.Date) has had its value changed (i.e., when observer.next is completed), or if there is a method like finalize for observables.