【发布时间】:2017-02-25 01:11:56
【问题描述】:
如何在我的应用程序中显示错误消息,而不是在控制台中打印。 这是下面的示例(在控制台中打印)
promise.catch(e => console.log(e.message));
我希望能够在我的 html 中打印以上内容。
有什么帮助吗?
【问题讨论】:
-
给变量赋值不起作用?
-
我已经尝试了很多次,但它不仅仅是工作。你还有什么想法吗?
-
请说明到目前为止您尝试了什么?
-
@SydneyLoteria 为什么要删除它?
-
这是我尝试过的:promise.catch(function(error){ this.one = error.message; });
标签: angular firebase-realtime-database firebase-authentication firebase-security angular2-forms