adopted-ember-addons / adopted-ember-addons/ember-router-helpers

Add option to pass params via array

Open
#11 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
38
Forks
16
PR merge metrics
No merged PRs in 30d

Description

While the route-params helper works fine, It seems to be failing for some scenarios for Query Params, and it does not (without some optimization?) play well with the `currentURL` observer here: https://github.com/rwjblue/ember-router-helpers/pull/10. Recompute will cause whole Class to reinstate which I guess is not optimal.
Also unless there's some refactoring, logic has to be maintained in two places - in helpers and the route-param util.

Maybe we could support a usage like this instead?

```hbs
{{#with (array 'foo' model) as |routeParams|}}
Dest
{{/with}}
```

I guess there would only need to be some check for `Ember.isArray(params[0])`? Or to make things more safe, we could keep the `route-params` helper but it would only return an array flagged as route-params that would then be passed directly into other helpers?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.