Skip to content

Instantly share code, notes, and snippets.

@Bernardoow
Forked from leonardocouy/example.html
Created June 10, 2016 17:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Bernardoow/2d58301f020a7c1e2e348f7ee3648dae to your computer and use it in GitHub Desktop.
Save Bernardoow/2d58301f020a7c1e2e348f7ee3648dae to your computer and use it in GitHub Desktop.
Trigger Tap Event - Leonardo Flores
<button class="button button-balanced" id="tap1" on-tap="execute()">Tap</button>
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