我有两个解析器:
public resolve(route: Activate...): Observable<Action> {
this.store.dispatch(new LoginAction());
return this.actions$.ofType(LOGGED_IN_ACTION).take(1);
}
MyDataLoadedResolver:
public resolve(route: Activate...): Observable<Action> {
this.store.dispatch(new LoadDataAction());
return this.actions$.ofType(DATA_LOADED_ACTION).take(1);
}
{
path: ':caseId',
component: CaseViewerComponent,
resolve: { login: LoginResolver, loadCase: MyDataLoadedResolver}
}
有没有办法让我等到登录解析程序完成后再执行loadCase解析程序,或者您会用不同的方式来执行?