Created
July 11, 2013 10:56
-
-
Save KentaKomai/5974506 to your computer and use it in GitHub Desktop.
jqueryUI + AngularJS Own directive
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
App.directive(directiveName, function($document, $parse) { | |
return { | |
restrict : 'A', | |
link : function($scope, $element, $attr) { | |
var fn = $parse($attr[e.name]); | |
$element.on(jQueryUIEventName, function(event, ui) { | |
$scope.$apply(function(){ | |
//processing of any | |
fn($scope, {data: _data}); | |
}); | |
}); | |
} | |
}; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment