@matanyed wrote:
Hey there, I want to run a function everytime
<button>
or<a>
is tappedI know $ionicGestures:
http://ionicframework.com/docs/api/service/$ionicGesture/#on
But it doesn't help in this case, because I don't want to use directives, I want it to be for every button or a element.How should I do it?
It's should be alternative for the jQuery case:
$("button, a").click(function() {
runFunction();
});By the way:
I can use directive like<button run-function>Click here</button>
but it has 2 disadvantage:
1. I need always to add this directive.
2. Can't use it in $ionicPopup (and more...)Found great solution:
http://plnkr.co/edit/Tq0abplQlOuOug95H0VB?p=catalogue
It's for all<a>
,<input>
,<button>
tags, and if there is a tag i want to set it specifically - i just use ionic-feedback, or $ionicFeedback factory.It was built for device-feedback plugin. it's great i swear. use it.
Posts: 1
Participants: 1