title: AngularJS - ngFocus and ngBlur Error
body: <p>I tried adding a code for ngFocus and ngBlur but everytime i start it, it wont seem to function, heres my js code:</p>
  
  <pre><code>function focusCtrl($scope) {
      $scope.hasFocus = false;
  }
  angular.module('app', [])
      .directive('ngFocus', ['$parse', function ($parse) {
          return function (scope, element, attr) {
              var fn = $parse(attr['ngFocus']);
              element.on('focus', function (event) {
                  scope.$apply(function () {
                      fn(scope, {$event: event});
                  });
              });
          };
      }])
      .directive('ngBlur', ['$parse', function($parse) {
          return function(scope, element, attr) {
              var fn = $parse(attr['ngBlur']);
              element.on('blur', function(event) {
                  scope.$apply(function() {
                      fn(scope, {$event:event});
                  });
              });
          };
      }]);
  </code></pre>
  
  <p>I'll add my html as well:</p>
  
  <pre><code>&lt;div class="col-lg-10"&gt;
  &lt;input ng-blur="hasFocus=false" ng-focus="hasFocus=true" type="text"  required="required" class="form-control form-validation" id="name" placeholder="Name" ng-model="artist.name" /&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>It gives me this error every time i reload the page, and i can't seem to understand the problem!</p>
  
  <pre><code>Uncaught TypeError: Object #&lt;Object&gt; has no method 'module' Focus.js:4
  (anonymous function)
  </code></pre>
  
  <p>Thanks for the help!</p>