title: ng-messages is not working
body: <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
    &lt;head&gt;
      &lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&gt;
      &lt;link rel="stylesheet" type="text/css" href="login.css"&gt;
      &lt;script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"&gt;&lt;/script&gt;
      &lt;script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.4.8/angular-messages.min.js"&gt;&lt;/script&gt;
    &lt;/head&gt;
    &lt;body ng-app="loginApp"&gt;
      &lt;div class="container"&gt;
        &lt;div class="login_logo"&gt;&lt;/div&gt;
      &lt;/div&gt;
      &lt;div class="form_container"&gt;
        &lt;div ng-messages="form_login.username.$error"&gt;
          &lt;div class="alertmsg" ng-message="required"&gt;Your username is required&lt;/div&gt;
        &lt;/div&gt;
        &lt;div class="form_left"&gt;
          &lt;form class="form_login" name="form_login" ng-controller="loginCtrl" ng-submit="submitForm()" novalidate&gt;
            &lt;div class="usr"&gt;
              &lt;input id="username" name="username" ng-model="username" type="text" autofocus="autofocus" required /&gt;
            &lt;/div&gt;
            &lt;div class="psw"&gt;
              &lt;input id="password" name="password" ng-model="password" type="password" required /&gt;
            &lt;/div&gt;
          &lt;/form&gt;
        &lt;/div&gt;
        &lt;div class="form_right"&gt;
          &lt;a class="submit" href="" ng-click="submitForm()"&gt;&lt;/a&gt;
        &lt;/div&gt;
        &lt;div class="clear"&gt;&lt;/div&gt;
      &lt;/div&gt;
      &lt;script type="text/javascript"&gt;
        var app = angular.module("loginApp", ["ngMessages"]);
        app.controller("loginCtrl", function($scope) {
          $scope.username = "11";
          $scope.password = "";
          $scope.submitForm = function() {};
        });
      &lt;/script&gt;
    &lt;/body&gt; 
  &lt;/html&gt;
  </code></pre>
  
  <p>I'm trying to use ng-messages to do a simple validation for the login form, particular div will be displayed if username is blank. But just can't find the error with the code above. Can anyone check the code? Thanks.</p>