Reputation: 656
I want to integrating jquery UI resizable in angular.js but unable to do so, I am trying to resize the div with resize handle in angular.js but I am fail to do so. Any help will be great. I have already created resize directive and included jquery Ui js for resizable but its not working.
app.directive('resize', function() {
return {
// A = attribute, E = Element, C = Class and M = HTML Comment
restrict:'E',
//The link function is responsible for registering DOM listeners as well as updating the DOM.
link: function(scope, element, attrs) {
element.resizable();
}
};
});
Thanks in advance !!
Upvotes: 0
Views: 2956
Reputation: 42669
I think the element object is a dom object. Wrap it in jquery $
and you may get the resizable()
method
$(element).resizable();
Also make sure jquery ui scripts are loaded before angularjs starts bootstrapping.
Upvotes: 1