From a23c6b1b6fcfa06caf307e1ee3452f457a1bfae3 Mon Sep 17 00:00:00 2001 From: gandhimathi Date: Thu, 12 Apr 2018 15:37:36 +0530 Subject: [PATCH] directive changes --- Apollo/assets/js/directives/compare-to.js | 11 +++++++++++ 1 file changed, 11 insertions(+) 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