【发布时间】:2018-09-19 18:55:21
【问题描述】:
所以我想在 Profile 组件中显示用户信息,但每当我运行服务器时,我都会收到两次相同的消息:“ArrayBuffer”类型上不存在属性“用户”。我试图查找它,但到目前为止我还没有得到任何线索是什么导致了这种情况。任何人都可以帮忙吗? 这是 profile.component.ts:
username;
email;
constructor(private auth: AuthService) { }
ngOnInit() {
this.auth.getProfile().subscribe(profile => {
this.username = profile.user.username;
this.email = profile.user.email;
})
}
【问题讨论】:
标签: angular properties arraybuffer