我得到了旧的和坏的Property 'payload' does not exist on type 'Action
做这个动作订阅:
由于是创建操作,我需要有效负载来签出userId
最近创建的用户并导航到/users/userId
顺便说一句:我正在关注这个非常好的教程
@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);
}
});
}
}