wzr1337 / angular-gestures

AngularJS directive that adds support for multi touch gestures to your app. Based on hammer.js.
MIT License
509 stars 100 forks source link

Browserify Support #21

Closed antikus closed 9 years ago

antikus commented 10 years ago

Is it possible somehow to use angular-gestures with browserify?

I'm using browserify, browserify-shim and bower. I installed angular-gestures via bower, and added a shim to gestures.js Then, in some of my modules I wrote require('angular-gestures') and added it to angular module. But the issue is that angular-gestures module can't see Hammer object.

The possible workaround for this issue I see is that we need to separate angular-gestures.js and hammer.js and add hammer.js as a dependency to angular.gestures.js. In this way bower will install hammer.js as dependency and we will be able to shim hammer.js.

Let me know what you think of it!

wzr1337 commented 9 years ago

Can you please try to add hammerjs to the bower file manually? that schould fix your issue? Does it?

wzr1337 commented 9 years ago

seems to work ;)