Hi
How can i get to $event.traget in custom directive?
HTML directive code:
<li>
<span ng-click="showGroup(child.id, $event)" class="section-name"
ng-hide="child.isNew">{[{ child.name }]}</span>
</li>
JS directive code:
app.directive('child', function($compile, GroupFactory){
return {
restrict: 'E',
replace: true,
scope: {
child: '='
},
templateUrl: '/bundles/bpocof/angular/scripts/templates/child.html',
// transclude: true,
link: function(scope, element, attrs) {
scope.showGroup = function(group_id, $event) {
}
}
}
});
And the $event in showGroup() function is undefined.
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.