This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
ngList with uninitialised variable always fails validation with parse: true #9044
Closed
Description
since you started all this parse
validation business, ngList no longer passes validation unless you initialise the variable it is bound to, to an empty array.
If we have an object:
$scope.model = {};
The HTML:
<input ng-model="model.foo" ng-list=", " name="foo" type="text">
foo
will always invalidate the form until you enter something into it, even though it is not required. This shouldn't really be expected functionality as you may have large objects with many properties and only want to add them to the view, rather than some huge object setting them all to null/[].
This is because the ngList parser returns the initial undefined value, which then invalidates the input.