Skip to content

Instantly share code, notes, and snippets.

@KentaKomai
Created July 11, 2013 10:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save KentaKomai/5974506 to your computer and use it in GitHub Desktop.
Save KentaKomai/5974506 to your computer and use it in GitHub Desktop.
jqueryUI + AngularJS Own directive
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