I have created angularjs
component. I wrote a custom event listener in jquery, event
is triggered by non-angularjs library.
$( "#myDiv" ).on( "CornerstoneImageRendered", function(e) {
// buisness logic
});
myDiv is a div
which is part of angularjs
component.
I want to write this listener into angularjs
component. How can I do it?
PS: Event link https://github.com/cornerstonejs/cornerstone/wiki/CornerstoneImageRendered-Event
Create a custom directive:
Usage
JS
For more information, see AngularJS Developer Guide - Creating Custom Directives