Does anyone know the ip mask mask plugin for AngularJS?
Since I tried to use "jQuery Input IP Address Control", but it does not work. When I try to use it, the attribute "ngModel" does not get the value of the text field. On the screen, I see the value inside the text box, however, if I do ".value ()" in the element, it returns the value "". The same thing happens when I see the value of the $ scope element using console.log ().
Can anybody help me?
Thank!
Edit: SOLVED
People, the problem is solved.
I used this directive available in http://docs.angularjs.org/api/ng.directive:ngModel.NgModelController :
app.directive('contenteditable', function() {
return {
restrict: 'A',
require: '?ngModel',
link: function(scope, element, attrs, ngModel) {
if(!ngModel) return;
ngModel.$render = function() {
element.html(ngModel.$viewValue || '');
};
element.bind('blur keyup change', function() {
scope.$apply(read);
});
read();
function read() {
ngModel.$setViewValue(element.val());
};
}
};
});
, , JQuery Plugin . , ngNodel element.val(). , element.text().