-
-
Save Bernardoow/2d58301f020a7c1e2e348f7ee3648dae to your computer and use it in GitHub Desktop.
Trigger Tap Event - Leonardo Flores
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<button class="button button-balanced" id="tap1" on-tap="execute()">Tap</button> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
angular.module('exampleApp', ['ionic']) | |
.controller('HomeCtrl', function($scope, $timeout) { | |
$timeout(function(){ | |
ionic.trigger('tap', { target: angular.element(document.querySelector('#tap1'))[0]}) | |
}, 1000); | |
$scope.execute = function(){ | |
console.log('You used tap!'); | |
}; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment