title: Why does ng-style call 2 times the function bound to it?
body: <p>I am using ng-style to pass the styling in one of my directives. </p>
  
  <p>Like so:</p>
  
  <pre><code>&lt;my-component ng-style="test()" ng-model="message"&gt;&lt;/my-component&gt;
  </code></pre>
  
  <p>And the directive:</p>
  
  <pre><code>myModule.directive('myComponent', function(mySharedService) {
      return {
          restrict: 'E',
          controller: function($scope, $attrs, mySharedService) {
              $scope.test = function(){
                  console.log(1)
              };
              $scope.$on('handleBroadcast', function() {
                  $scope.message = 'Directive: ' + mySharedService.message;
              });
          },
          replace: true,
          template: '&lt;input&gt;'
      };
  });
  </code></pre>
  
  <p><a href="http://jsfiddle.net/njS2L/" rel="nofollow">JSFIDDLE That logs 2 times '1'</a> </p>
  
  <p>Why is the <code>test</code> function called 2 times? </p>