I am trying to use the "ng-mouseover" directive in an image with "ng-if" and this will not work, but if I use the "ng-show" directive, it works, can everyone tell me why? Or is this an AngularJS problem?
In the AngularJS documentation, I can't read anything about this: https://docs.angularjs.org/api/ng/directive/ngMouseover
ng show
<button ng-show="true" ng-mouseover="countOne = countOne + 1" ng-init="countOne=0"> Increment (when mouse is over) </button> Count: {{countOne}}
ng- if
<button ng-if="true" ng-mouseover="countTwo = countTwo + 1" ng-init="countTwo=0"> Increment (when mouse is over) </button> Count: {{countTwo}}
Fiddle: http://plnkr.co/edit/Wb6bjyJdHj5qoH7fxGFJ?p=info
Aitor source share