RyanMullins / angular-hammer

Hammer.js v2 support for AngularJS
http://ryanmullins.github.io/angular-hammer/
MIT License
188 stars 55 forks source link

Use the $parse getter when evaluating expression string #15

Closed mikec closed 9 years ago

mikec commented 9 years ago

Allows for expressions other than the name of the event handler function - needed when using controllerAs:

<div ng-controller="hmCtrl as ctrl" hm-tap="ctrl.onHammer"></div>

Also, removed the $scope.$apply call from the demo code, since the expression evaluation code will always call $scope.$apply when needed. Updating a scope property in the dragging demo to show x and y coordinates, to show that UI is being updated without explicitly calling $scope.$apply.