title: AngularJS ng-change not calling function
body: <p>I'm trying to get the content in a bootstrap popover to change when the user types something in the email text box. It seems that ng-change is not getting into the method <code>updateToolTip()</code>. I'm brand new to AngularJS. Any advice is appreciated.</p>
  
  <p>html page
  </p>
  
  <pre><code>&lt;div ng-controller="LoginController"&gt;
  
    &lt;for name="form" ng-submit="login()"&gt;
  
      &lt;input type="email" name="email" ng-model="user.email" value="{{user.email}}" ng-change="updateToolTip()" popover="{{emailMessage}}" popover-trigger="focus" popover-placement="right" required&gt;
  
      &lt;button class="btn btn-lg btn-primary btn-block" type="submit" ng-disabled="form.$invalid"&gt;Sign in&lt;/button&gt;
    &lt;/form&gt;
  
  &lt;/div&gt;
  </code></pre>
  
  <p></p>
  
  <p>js</p>
  
  <pre><code>var loginModule = angular.module('loginModule', ['ui.bootstrap']);
  
  // Controller for the login page
  loginModule.controller('LoginController', ['$scope', '$http', function($scope, $http) {
  
      $scope.emailMessage = 'test';   
  
      $scope.updateToolTip = function() {
  
          $scope.emailMessage = 'asdfsadf';   
          console.log();
          console.log(' inside function');
          if($scope.user != null) {
              console.log('user not null');
              if($scope.user.email.$dirty &amp;&amp; $scope.user.email.$error.email) {
                  console.log('email dirty and error');
                  $scope.emailMessage = 'Invalid Email!';
              } else if($scope.form.email.$dirty &amp;&amp; $scope.form.email.$error.required) {
                  console.log('emaildirty and required');
                  $scope.emailMessage = 'Email Required';
              }
          }
      }
  }]);
  </code></pre>