Kelly Selden
Kelly Selden

Reputation: 1276

Query params not persisting in Ember.js

Given the template

<script type="text/x-handlebars">
  {{#link-to 'test' (query-params test=0)}}link{{/link-to}}
</script>

and the script

App = Ember.Application.create();

App.Router.map(function() {
  this.resource('test');
});

App.TestController = Ember.ArrayController.extend({
  queryParams: ['test'],
  test: null
});

The query params are not showing up in the url when I click, shown here http://emberjs.jsbin.com/qawoza/1/edit. What am I doing wrong?

Upvotes: 1

Views: 175

Answers (1)

Kingpin2k
Kingpin2k

Reputation: 47367

When you're looking at it in editor mode in jsbin, the output is in it's own iframe. If you pop out to live preview you'll see your query params.

http://emberjs.jsbin.com/qasilu/1

Upvotes: 0

Related Questions