RyanMullins / angular-hammer

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

Angular-hammer throws TypeError when evaluating angular expressions #28

Closed ramoneguru closed 9 years ago

ramoneguru commented 9 years ago

Fiddle here: http://jsfiddle.net/ramoneguru/b1sckc80/

I was using the hm-tap feature to evaluate the following:

<h1 ng-init="test1 = true" hm-tap="test1 = !test1">Click here to see value: {{test1}}</h1>

When toggling the test1 value I get an error in the console, "TypeError: undefined is not a function" Updating test1's value from "false" to "true": "TypeError: undefined is not a function" Updating test1's value from "true" to "false": No error

Error seems to happen on line 168 of angular.hammer.js

if (fn) {
  fn.call(scope, event);
}
RyanMullins commented 9 years ago

Fixed in #29