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

Commit ed6b45c

Browse files
committed
fix(select): remove correct controller from formCtrl w/ name
closes #3062, closes #3671
1 parent 1478628 commit ed6b45c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/select/select.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ function SelectDirective($mdSelect, $mdUtil, $mdTheming, $mdAria, $interpolate,
169169

170170
if (attr.name && formCtrl) {
171171
var selectEl = element.parent()[0].querySelector('select[name=".' + attr.name + '"]');
172-
formCtrl.$removeControl(angular.element(selectEl).controller());
172+
formCtrl.$removeControl(ngModelCtrl);
173173
}
174174

175175

0 commit comments

Comments
 (0)