diff --git a/Apollo/assets/js/directives/compare-to.js b/Apollo/assets/js/directives/compare-to.js index 9753374c..5b4ddb8d 100755 --- a/Apollo/assets/js/directives/compare-to.js +++ b/Apollo/assets/js/directives/compare-to.js @@ -37,4 +37,15 @@ app.directive('capitalize', function() { 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, '')); + }); + } + }; }); \ No newline at end of file