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

Passing block parameters to nested routes

$
0
0

@Bauke wrote:

Regularly I encounter situations where I’d like to pass a block parameter of a component to a nested route. But as far as I know there is no way the {{outlet}} helper allows this.

// parent-route.hbs
{{#some-component as |someProperty someAction|}}
  {{outlet}}
{{/some-component}}

// child-route.hbs
{{nested-component aProperty=someProperty anAction=someAction}}

So I feel like I have to choose between either component composition in a single route or some wacky interaction involving routes/services to enable route state. Being able to pass parameters to a nested route would make component composition much more flexible.

How do you feel about it?

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4829

Trending Articles