title: AngularJS: Simple Blur Function
body: <p>I am new to AngularJS. Learned from W3school. Now moving forward to know how blur function and <code>ui-event</code> works from other sites. So I got this code which is not working please let me know the reason or a better way to call blur function.</p>
  
  <p>HTML</p>
  
  <pre><code>    &lt;div ng-app="" ng-controller="testing" &gt;
      &lt;input ui-event="{ blur : 'blurCallback()' }"&gt;
      &lt;/div&gt;
  </code></pre>
  
  <p>Script tag</p>
  
  <pre><code>function testing($scope){
      $scope.blurCallback = function() {
      alert('Goodbye');
      };
  }
  </code></pre>