angular-hammer icon indicating copy to clipboard operation
angular-hammer copied to clipboard

add user specific parameter, used in callback

Open neophob opened this issue 10 years ago • 1 comments

Hi Ryan

Thanks for your library. I needed to add a custom parameter to each directive call. Example:

<div hm-payload="CUSTOM PARAMETER" hm-press="onHammer" hm-pressup="onHammer" hm-recognizer-options='{"preventGhosts":true,"time":500}'></div>

then the scope function looks like this:

$scope.onHammer = function(event, payload) {
    console.log('I got an event: ', event.type);
    console.log('payload: '+payload);
}

neophob avatar Apr 10 '15 22:04 neophob

I recenty merged #55. Can you take a look at this stuff again and see if those changes solve your issue?

RyanMullins avatar Jun 19 '15 11:06 RyanMullins