【发布时间】:2018-07-27 18:14:53
【问题描述】:
我得到了旧的和坏的Property 'payload' does not exist on type 'Action做这个动作订阅:
由于是创建操作,我需要有效负载来签出最近创建的用户的 userId 并导航到 /users/userId
顺便说一句:我正在关注this really nice tutorial
@Component({
selector: 'app-sample',
templateUrl: 'sample.html',
})
export class AppComponent {
subs = new Subscription();
constructor(private actionsSubject: ActionsSubject) {
this.subs = actionsSubject.subscribe(action => {
if (action.type === actions.CREATE_USER_SUCCESS) {
console.log(action.payload);
}
});
}
}
【问题讨论】:
标签: angular observable ngrx ngrx-store ngrx-entity