Skip to content

Instantly share code, notes, and snippets.

@leonardocouy
Created March 29, 2016 14:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save leonardocouy/b6ca1f838a9c42cbab40 to your computer and use it in GitHub Desktop.
Save leonardocouy/b6ca1f838a9c42cbab40 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