I have two actions, action1 which brings control-related things from service all and action2 which bring data related to those control. I want to dispatch action1 and when it successfully completes then only want to dispatch action2.
ngOnInit() {
this.store.dispatch(new Action1(data1));
this.store.select(action1Sel).subscribe(res =>{
this.store.dispatch(new Action2(data2));
});
}
I have like this but looking for a better way of doing it. what is the efficient way to achieve this in ngrx?