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

Add option to pass params via array

Đang mở
#11 2 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
JavaScript
Star
38
Fork
16
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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?

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.