ng-mouseover call all functions inside it
I have problem with ng-mouseover. It alway call all functions inside it. You can see in link: http://plnkr.co/edit/vPhMGwjgXQZzh5WFmv8q?p=preview
HI, this is actually working as expected. mouseover -> digest -> interpolated stuff gets re-evaluated.
But I just want call function only in ng-mouseover. How can I do that?
Please read the contributing guidelines; these types of questions are ill-suited for GitHub. Thanks!
@buihoanghai at the risk of invoking the wrath of Brian for answering a question on GitHub (I joke), you'll want to make sure that you don't cause a $digest. In particular, this would mean writing your own event handler directive which doesn't $digest. You can see how these are implemented in https://github.com/angular/angular.js/blob/master/src/ng/directive/ngEventDirs.js#L39-L59 --- The difference would be that you wouldn't use $scope.$apply(), but just $scope.$eval() instead
Other alternative solutions include using the new one-time binding syntax for your function calls in the template, if appropriate, or just using jQuery or native DOM apis for listening to DOM events from a directive or controller (be careful if you do this from a controller though, it's not really a great idea).
I'm sorry about that. I'll find other forum for post question :).