-
Notifications
You must be signed in to change notification settings - Fork 27.5k
ngOptions with boolean values breakes select element #3490
Comments
I am not able to reproduce this issue with the 1.1.5 nor 1.0.7 |
@lgalfaso is right (thnx once again!), seems to be working OK in a jsfiddle. |
To reproduce the issue add the |
This issue is a duplicate of #2594 and I think neither of them should be closed as long as the PR is not merged. |
I don't think that having duplicate issues open will help get this fixed. The two issue reference each other and a fix should ensure that both are working. If you wanted to help you could provide a PR that has unit tests for |
Make the `required` directive accept the model value `false` when it is not an <input> element or when the <input> element is not a checkbox Closes angular#3490 angular#2594
`checkboxInputType` and `ngList` directives need to have special logic for whether they are empty or not. Previously this had been hard coded into their own directives or the `ngRequired` directive. This made it difficult to handle these special cases. This change factors out the question of whether an input is empty into a method `$isEmpty` on the `ngModelController`. The `ngRequired` directive now uses this method when testing for validity and directives, such as `checkbox` or `ngList` can override it to apply logic specific to their needs. Closes angular#3490, angular#3658, angular#2594
`checkboxInputType` and `ngList` directives need to have special logic for whether they are empty or not. Previously this had been hard coded into their own directives or the `ngRequired` directive. This made it difficult to handle these special cases. This change factors out the question of whether an input is empty into a method `$isEmpty` on the `ngModelController`. The `ngRequired` directive now uses this method when testing for validity and directives, such as `checkbox` or `ngList` can override it to apply logic specific to their needs. Closes angular#3490, angular#3658, angular#2594
`checkboxInputType` and `ngList` directives need to have special logic for whether they are empty or not. Previously this had been hard coded into their own directives or the `ngRequired` directive. This made it difficult to handle these special cases. This change factors out the question of whether an input is empty into a method `$isEmpty` on the `ngModelController`. The `ngRequired` directive now uses this method when testing for validity and directives, such as `checkbox` or `ngList` can override it to apply logic specific to their needs. Closes angular#3490, angular#3658, angular#2594
`checkboxInputType` and `ngList` directives need to have special logic for whether they are empty or not. Previously this had been hard coded into their own directives or the `ngRequired` directive. This made it difficult to handle these special cases. This change factors out the question of whether an input is empty into a method `$isEmpty` on the `ngModelController`. The `ngRequired` directive now uses this method when testing for validity and directives, such as `checkbox` or `ngList` can override it to apply logic specific to their needs. Closes angular#3490, angular#3658, angular#2594
I have this array for ngOptions:
$scope.boolValues = [{value: true, name: 'True'}, {value: false, name: 'False'}];
and this ng-options in html:
ng-options="bool.value as bool.name for bool in boolValues"
When I try to select "False" in select element new empty options is created and selected. When I try to select "True", empty option is removed and correct option is selected.
I think ngOption directive is not prepared for boolean values...
The text was updated successfully, but these errors were encountered: