Issue
When the user does not enter the correct credentials the following error appears.
I am already treating the error and do not want this to print out to the debug window.
My code:
-------------auth.service.ts-------------
login(user: User) {
return this.http.post(this.config.getBaseUrl()+'oauth/token', user, this.config.getHeader())
.map(res => res.json());
}
-------------login.component.ts-------------
login() {
this.authService.login(this.user).subscribe(
result => console.log(result),
error => console.log(error)
);
How can I prevent this error from printing out?
Solution
This is not something angular do. It is a functionality of the browser. you cannot remove it by changing your client side code.
Answered By - Jayantha Lal Sirisena
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.