title: How to show error messages in AngularJS?
body: <p>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 <code>Username already exists</code> or<code>Wrong email and password</code> 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? </p>
  
  <pre><code>$http.post('/register', registerUser).then(function(response){
                  console.log(response.data);
  }
  </code></pre>
  
  <p>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. </p>
  
  <p>Thanks </p>