Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

Nested items render in wrong order with ng-switch #2024

Closed
idanbauer opened this issue Feb 17, 2013 · 2 comments
Closed

Nested items render in wrong order with ng-switch #2024

idanbauer opened this issue Feb 17, 2013 · 2 comments

Comments

@idanbauer
Copy link

If you put an element between the "ng-switch on" and "ng-switch-when" directives angular the "ng-switch-when element" will render outside of the enclosing element.

I created a plunker to illustrate the issue:
http://plnkr.co/edit/3JOtnFUGXX38gJOrcI3q

which results in the following dom:

<div ng-switch="" on="item">
        <div>label</div>
        <div style="color:red">
          item
          <!-- ngSwitchWhen: one -->
          <!-- ngSwitchWhen: two -->
          <!-- ngSwitchWhen: three -->
        </div>
      <div ng-switch-when="three" class="ng-scope">three</div>
</div>

You guys are doing an amazing job BTW :-)

@gonzaloruizdevilla
Copy link
Contributor

Plnkr is down, so I can't check your example.
Is this issue a duplicate of #1074 which was closed a few days ago?

@idanbauer
Copy link
Author

Yes, I was looking for a duplicate but Couldn't find it. I looked for different wording.
Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants