Hett
Hett

Reputation: 3823

Ember: link-to and transer queryParams

i do not understand, i try to transfer params into request http://emberjs.com/guides/routing/asynchronous-routing/

My router setting:

App.Router.map(function () {
    this.resource('index', {path: '/'});
    this.resource('forum', {path: '/forum'}, function(){
        this.route('index');
        this.route('view', {path: ':forum_id', queryParams: ['page']});
    ));
});

Template

{{#each forum in forums}}
    {{#link-to 'forum.view' forum page=1}}
        {{forum.name}}
    {{/link-to}}
{{/each}}

But ember generate links without my param "page":

#/forum/52baf4c55a8561601f00002a

Why?

Upvotes: 1

Views: 2025

Answers (1)

edpaez
edpaez

Reputation: 1583

Did you enable the feature?

http://emberjs.com/guides/configuring-ember/feature-flags/

What version of Ember are you using? According to Docs you must be using a canary build because it's an experimental feature:

query params are an experimental feature. You must be using a recent canary build of Ember, and enable the query-params feature flag

Upvotes: 2

Related Questions