This repository has been archived by the owner on Apr 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 27.5k
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This is a useful hack, but the syntax is not pretty. How difficult would it be to re-do ng-switch to preserve the order of the elements so we don't need this hack? |
For sure it is possible without the ng-switch-always :-) |
Just to be sure, is fcfb400e951b0dbb89505226d273dd6bc4c2943f what you were thinking in? |
Sorry for the delay. Yes, that is exactly what I was thinking. |
|
Squash this into a single commit to make it easy to review |
I like the direction of this PR. ngSwichAlways looked bad. The current solution is much more elegant. |
Fixed the issues posted. |
Preserve the order of the elements that are not part of a case nor default in a ng-switch directive Closes angular#1074
CI is passing: http://ci.angularjs.org/job/angular.js-james/26/ |
landed as e88d617 |
Nice work! |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
New directive to show elements inside a switch statement regardless if there
was a case match or the match was to a default
Elements marked as ng-switch-always show up in the position that they were
declared inside the ng-switch
Closes #1074