directive changes
This commit is contained in:
parent
17e4218ffa
commit
a23c6b1b6f
@ -37,4 +37,15 @@ app.directive('capitalize', function() {
|
|||||||
capitalize(scope[attrs.ngModel]); // capitalize initial value
|
capitalize(scope[attrs.ngModel]); // capitalize initial value
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
});
|
||||||
|
app.directive('disallowSpaces', function() {
|
||||||
|
return {
|
||||||
|
restrict: 'A',
|
||||||
|
|
||||||
|
link: function($scope, $element) {
|
||||||
|
$element.bind('input', function() {
|
||||||
|
$(this).val($(this).val().replace(/ /g, ''));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
});
|
});
|
||||||
Loading…
Reference in New Issue
Block a user