Jeanluca Scaljeri
Jeanluca Scaljeri

Reputation: 29159

EmberJs: nested views

I have this view which can rotate a div element. Something like

<div class="rotatable">
    <div class="front">
         {{outlet front}}
    </div>
    <div class="back">
        {{outlet back}}
    <div>
</div>

Now I have this index template which contains two of these rotatable elements. Each rotatable elements has a different front and back. So it could look like this

<div id="index">
    {{#rotatable}}
        {{outlet front App.FrontView1}}
        {{outlet back App.BackView1}}
    {{/rotatable}}
    {{#rotatable}}
        <div>This should show up inside {{outlet front}}</div>
        {{outlet back App.BackView2}}
    {{/rotatable}}
</div>

This doesn't work of course, but how should this be done ?

Cheers

Upvotes: 0

Views: 393

Answers (1)

Jeanluca Scaljeri
Jeanluca Scaljeri

Reputation: 29159

I guess this question was a little bit unclear. Anyway, the answer is given in this post

EmberJs: how to use connectOutlet

Upvotes: 1

Related Questions