You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 24, 2019. It is now read-only.
There's no way to use jqueryui's widgets that should/could be bound to ng-model (slider, progressbar, autocomplete?, spinner) ng-model should be set up to update the value of the plugin for these types.
i'll just leave this here: (this additional directive works for me)
function uiJq($timeout, $log) {
return {
require: '?ngModel',
link: function(scope, elm, attrs, ngModel) {
var block = false;
if (ngModel) {
ngModel.$render = function() {
block = true;
try {
plugin('value', ngModel.$viewValue);
} finally {
block = false;
}
};
}
//specific events for slider, could add more.
elm.on('slidechange slide', function(evt, ui) {
if (!block) {
scope.$apply(function() {
ngModel.$setViewValue(plugin('value'));
});
}
});
function plugin() {
if (elm.is(':ui-' + attrs.uiJq)) {
return elm[attrs.uiJq].apply(elm, arguments);
}
}
}
}
}
The text was updated successfully, but these errors were encountered:
There's no way to use jqueryui's widgets that should/could be bound to ng-model (slider, progressbar, autocomplete?, spinner) ng-model should be set up to update the value of the plugin for these types.
i'll just leave this here: (this additional directive works for me)
The text was updated successfully, but these errors were encountered: