Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit ed44dd0

Browse files
revert:fix(input): ensure that hidden input values are correct after history.back
This reverts commit 7ec663f. There was a regression against angular-material that relied upon the input directive.
1 parent a5f4d32 commit ed44dd0

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

src/ng/directive/input.js

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -899,16 +899,11 @@ var inputDirective = ['$browser', '$sniffer', function($browser, $sniffer) {
899899
return {
900900
restrict: 'E',
901901
require: '?ngModel',
902-
compile: function(tElement, tAttr) {
903-
if (lowercase(tAttr.type) === 'hidden') tAttr.$set('autocomplete', 'off');
904-
return {
905-
pre: function(scope, element, attr, ctrl) {
906-
if (ctrl) {
907-
(inputType[lowercase(attr.type)] || inputType.text)(scope, element, attr, ctrl, $sniffer,
908-
$browser);
909-
}
910-
}
911-
};
902+
link: function(scope, element, attr, ctrl) {
903+
if (ctrl) {
904+
(inputType[lowercase(attr.type)] || inputType.text)(scope, element, attr, ctrl, $sniffer,
905+
$browser);
906+
}
912907
}
913908
};
914909
}];

0 commit comments

Comments
 (0)