I have services and controllers written in AngularJS, in which I am sending a post request to Node.js Application and using send status and code to send a error message like Username already exists orWrong email and password but I am not getting How to show these errors in frontend HTML. Like after submit is pressed probably. How would you go about it?
$http.post('/register', registerUser).then(function(response){
console.log(response.data);
}
How will I show response .data in the HTML. I read about $error in angular but I don't think it will work in my case as mine is a custom error.
Thanks