I am using the NgRx Store in my application.
home.html
<list-objects
[array]="array| async"
(Edit)="Edit($event)"
(Delete)="Delete($event)"
></list-objects>
Home.ts
export class HomePage {
public array: Observable<itm[]>;
constructor(){
this.array= this.store.select(state => state.array);
this.array.subscribe((a) => {
console.log(a);
}
}
Edit(event){
this.store.dispatch(this.actions.updateItem(event.item));
}
}
When I edit an array element, the asynchronous channel does not update the view, but the values in the "array" objects are correct (console.log inside the subscription shows the updated value). When I click somewhere in the DOM (open the modal, press the buttons ...), I look for updates with new values.
I also register a child component of "ngOnChanges" and it does not start with the new value.
source
share