Open mackelito opened 3 years ago
Oh.. It must be something with the dirty checking in angular where the object does not change but only the underlaying array..
Spoke to soon.. There is something else going on here..
ngOnInit() {
this.storage.observe('cart').pipe(
startWith(this.storage.retrieve('cart'))
).subscribe(cart => {
console.log('summary', cart);
this.cartSubject.next(cart);
});
}
This summary only triggers on the first remove.. but all adds?
Not sure if it's just me or if this is a bug or not :D
In both functions I see that the
refreshExpireDate
does trigger in my service as it is updated in localstorage...but the subscription I have does not trigger on remove.. only add?