/ / Div resizable in angular.js - jquery, angularjs

Div resizable w angular.js - jquery, angularjs

Chcę zintegrować jquery UI resizable wangular.js, ale nie można tego zrobić, Próbuję zmienić rozmiar elementu div za pomocą uchwytu zmiany rozmiaru w pliku angular.js, ale nie udało mi się tego zrobić. Każda pomoc będzie świetna. Mam już utworzoną dyrektywę resize i uwzględniono jquery Ui js dla resizable, ale nie działa.

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();
}
};
});

Z góry dziękuję !!

Odpowiedzi:

1 dla odpowiedzi № 1

Myślę, że obiekt elementu jest obiektem domowym. Zawiń w jquery $ i możesz dostać resizable() metoda

$(element).resizable();

Upewnij się również, że skrypty jquery ui są ładowane przed rozpoczęciem ładowania przez angularjs.