【发布时间】:2017-03-01 15:52:13
【问题描述】:
如何访问 Error.code 属性? 我收到 Typescript 错误,因为“错误”类型上不存在属性“代码”。
this.authCtrl.login(user, {
provider: AuthProviders.Password,
method: AuthMethods.Password
}).then((authData) => {
//Success
}).catch((error) => {
console.log(error); // I see a code property
console.log(error.code); //error
})
或者还有其他方法可以制作自定义错误消息吗?我想用另一种语言显示错误。
【问题讨论】:
标签: angular typescript firebase angularfire2