victoroniibukun
victoroniibukun

Reputation: 88

How do you display error message from firebase into an angular2 application

How do I display error message in my application as oppose to printing in the console. This is an example below (printing in console)

promise.catch(e => console.log(e.message));

I want to be able to print the above in my html.

Any help?

Upvotes: 1

Views: 566

Answers (1)

micronyks
micronyks

Reputation: 55443

You can use AarrowFunction ()=> as shown,

promise.catch((error)=>{ this.one = error.message; });

Upvotes: 1

Related Questions