@dreyer wrote:
Hello.
I getting in trouble trying to add a click event for an element in my modal...
Its inside a directive to avoid repeat the same code on each controller. Thats why I wanna set the click here too, to avoid create the same clickevent in every controller.$ionicModal.fromTemplateUrl('views/modal-info/'+view, {
scope: $scope,
animation: 'slide-in-up'
}).then(function(modal) {
$scope.modal = modal;
modal.show();
modal.$el.find('fieldset').on("click", function(event){
console.log(event);
});
});if I console.log($el), I can navigate through childNodes until the fieldset I want, but the .find() never finds anything. No matter what I try to find (I tried with also with the same result).
What am I doing wrong? Or is there another good way to make it?
Posts: 2
Participants: 1