Dear Sir/ Madam,

I would like to ask a question about how to handle event "Right Click on 
each Element". 
i created event right click with directive and i call it to each element 
that it has parent and child.
directives.directive('rightContext',['$compile','$parse',function($compile,$parse){
return{
restrict: 'A',
scope:false,
link : function(scope,element,attrs,ctrl){ 
var id = "#rightcontext-panel"; 
element.on('contextmenu',function(e){
if($(id)) $(id).remove();
if($('#rightclick-panel')) $('#rightclick-panel').remove();
e.preventDefault();
element.append( $compile(scope.contextMenu)(scope)); 
var panel = $(id);
panel.css({
'top':e.clientY,
'left':e.clientX,
'position':'absolute',
'z-index':3020
}); 
});
element.on('mouseleave click',function(e){
if($(id)) $(id).remove();
if($('#rightclick-panel')) $('#rightclick-panel').remove();
});
}
}
}]);

when i right click on each element it has problem with element that it has 
child.

Do you have any idea?

Best,

Veasna.

-- 
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.

Reply via email to