Created
March 29, 2016 14:46
-
-
Save leonardocouy/b6ca1f838a9c42cbab40 to your computer and use it in GitHub Desktop.
Trigger Tap Event - Leonardo Flores
This file contains hidden or 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 hidden or 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