title: run function on mousemove angularjs
body: <p>I want create animation on mousemove in angularjs. I found example
  <a href="https://docs.angularjs.org/api/ng/directive/ngMousemove" rel="nofollow">https://docs.angularjs.org/api/ng/directive/ngMousemove</a></p>
  
  <p>but i want to run function.
  So inside of body</p>
  
  <pre><code>&lt;body data-ng-mousemove="squareRotate()"&gt;
  </code></pre>
  
  <p>And js:</p>
  
  <pre><code>$scope.squareRotate = function(){
    alert();
  };
  </code></pre>
  
  <p>but i cant make it work. How can i manage it without   puting it inside of controller ?</p>