Quantcast
Channel: Ember.JS - Latest topics
Viewing all articles
Browse latest Browse all 4831

Accessing templates as data

$
0
0

@samselikoff wrote:

Let’s say I have the following template:

<DropdownList as |List|>
  <List.item>
    One
  </List.item>
  <List.item>
    Two
  </List.item>
  <List.item>
    Three
  </List.item>
</DropdownList>

Is it possible for DropdownList to have a computed property that iterates over its children Item components?

I’ve seen some “registration” patterns

{{yield (hash
  item=(component 'dropdown-list/item'
    did-insert=(action 'registerItem')
  )
)}}

but I sometimes hit the “you modified X twice in a since render” error with this pattern, and I’m just wondering if there’s any other approaches.

Posts: 4

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 4831

Trending Articles