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

Add option to pass params via array

オープン
#11 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
JavaScript
スター
38
フォーク
16
PR マージ指標
30日以内にマージされた PR はありません

説明

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?

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。