Commit 50516545a64bc145f0367237c98f8f7af29a82a6
1 parent
365c7ff9fd
Exists in
master
Quitar autocomplete de los inputs
Showing
1 changed file
with
7 additions
and
6 deletions
Show diff stats
src/js/uppercaseOnly-directive.js
... | ... | @@ -4,17 +4,18 @@ angular.module('focaDirectivas') |
4 | 4 | return { |
5 | 5 | require: '?ngModel', |
6 | 6 | link: function(scope, element, attrs, modelCtrl) { |
7 | - if(attrs.type === 'text' && | |
8 | - !attrs.readonly && | |
9 | - !attrs.disabled && | |
10 | - !attrs.uibDatepickerPopup) { | |
11 | - | |
7 | + if (attrs.type === 'text' && | |
8 | + !attrs.readonly && | |
9 | + !attrs.disabled && | |
10 | + !attrs.uibDatepickerPopup) { | |
11 | + | |
12 | 12 | modelCtrl.$parsers.push(function(input) { |
13 | 13 | return input ? input.toUpperCase() : ''; |
14 | 14 | }); |
15 | 15 | } |
16 | - | |
16 | + | |
17 | 17 | element.addClass('text-uppercase'); |
18 | + element[0].autocomplete = 'off'; | |
18 | 19 | } |
19 | 20 | }; |
20 | 21 | } |