You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
The problem is that this observer fires with undefined if the input doesn't have a "name" attribute, causing the control to be renamed to undefined. If multiple inputs are missing the "name" attribute, they are all renamed to undefined, and overwrite each other in the formCtrl object.
And a test that fails before the fix and passes after the fix:
// test/ng/directive/inputSpec.jsit('should not rename form controls in form when name is undefined',function(){compileInput('<input type="text" ng-model="name" />');expect(scope.form['undefined']).toBeUndefined();});
I'm happy to submit this as a PR, but I wanted to file an issue first to confirm that this is unexpected behavior, and that my fix looks OK.