@wggley wrote:
I tried to bind this way:
(function() { angular .module('mymodule') .directive('mydirective', mydirective); mydirective.$inject = []; function mydirective() { return { link: function(scope, element, attrs) { element.on('tap', function() { //do something }); } } } })();
But don't worked, if I try to bind a click event it works nicely.
This was the only method I could bind (I looked at ionic.bundle.js to see how you bind):
(function(ionic) { angular .module('mymodule') .directive('mydirective', mydirective); mydirective.$inject = []; function mydirective() { return { link: function(scope, element, attrs) { ionic.on('tap', function() { //do something }, element[0]); } } } })(ionic);
What I'm missing here?
Posts: 1
Participants: 1