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 has been archived by the owner on Apr 12, 2024. It is now read-only.
I was able to do that with Angular 1.3.x. With Angular 1.4.x instead of an adding a default option, the default option is displayed as selected in the closed select box, but in fact the first real option is selected. That's independent of wether ng-if is true or false.
When I resort to ng-show it works correctly in the "true" case. However, in the "false" case, it will show the default option as selected although when opening the select (or inspecting the element), it's not there.
As a workaround one can use ng-show and set an option as selected explicitly.
The text was updated successfully, but these errors were encountered:
I cannot conditionally have a default option for a select using ng-if. See here: http://plnkr.co/edit/lGaZeIFHBUTVciqNMp2B?p=preview
I was able to do that with Angular 1.3.x. With Angular 1.4.x instead of an adding a default option, the default option is displayed as selected in the closed select box, but in fact the first real option is selected. That's independent of wether ng-if is true or false.
When I resort to ng-show it works correctly in the "true" case. However, in the "false" case, it will show the default option as selected although when opening the select (or inspecting the element), it's not there.
As a workaround one can use ng-show and set an option as selected explicitly.
The text was updated successfully, but these errors were encountered: