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

Add option to pass params via array

Offen
#11 2 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
JavaScript
Sterne
38
Forks
16
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

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?

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.