angularjs - Is there any performance difference between $emit event and casual function call in ng-click? -


<script>   angular.app('app', [])   .controller('ctrl', function($scope) {      $scope.$on('foo', function(evt, msg) {          alert(msg);       });      $scope.foo = function(msg) {           alert(msg);       };     }); </script> <div ng-app="app"> <div ng-controller="ctrl"> <button ng-click="foo('some msg')">call</button> <button ng-click="$emit('foo')">emit</button> </div> </div> 

is there significant performance different between 2 cases? case should go by?


Comments

Popular posts from this blog

ruby - Trying to change last to "x"s to 23 -

jquery - Clone last and append item to closest class -

c - Unrecognised emulation mode: elf_i386 on MinGW32 -