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.
Check this: http://plnkr.co/edit/OtwP7LK34MuOeXDxiM3x?p=preview
When options are loaded from http request (in plunkr I use $timeout) the empty option apears at the last position when using ng-if on it. When I use ng-show everything works well.
This is on Angular 1.3
I'm also curious why it (the ng-if version) doesn't work on Angular 1.4 (I get TypeError: undefined is not a function on console - http://plnkr.co/edit/RpGCd4UpOVoi2VBfbWZb?p=preview)
The text was updated successfully, but these errors were encountered:
I assume that's because ngIf's link fn is executed after ngOptions runs, so the options are already inserted.
I wonder what your use case for that is? Why do you need conditional empty options with ngIf?
Check this: http://plnkr.co/edit/OtwP7LK34MuOeXDxiM3x?p=preview
When options are loaded from http request (in plunkr I use $timeout) the empty option apears at the last position when using ng-if on it. When I use ng-show everything works well.
This is on Angular 1.3
I'm also curious why it (the ng-if version) doesn't work on Angular 1.4 (I get
TypeError: undefined is not a function
on console - http://plnkr.co/edit/RpGCd4UpOVoi2VBfbWZb?p=preview)The text was updated successfully, but these errors were encountered: