Handlebars error: could not find the 'query-params' property, although the function is activated

I am trying to use request parameters in my route / controller, but the handlebars helper is causing this error:

Unprepared error: <(subclass Ember._MetamorphView): ember689> Error Handlebars: could not find the 'query-params' property on the object.

This error is caused by this link for the helper:

{{#link-to 'betround.stats' (query-params game=id) }} <li {{bind-attr class="isPast:small"}}> {{team1}} {{scoreT1}} : {{scoreT2}} {{team2}} (gameid: {{id}})</li> {{/link-to }} 

I have already updated Ember and Handlebars

 DEBUG: Ember : 1.4.0-beta.4 DEBUG: Ember Data : 1.0.0-beta.4 DEBUG: Handlebars : 1.3.0 DEBUG: jQuery : 2.0.3 

As well as the request-params-new function:

  <script type="text/javascript"> ENV = {FEATURES: {'query-params-new': true}}; </script> <script src="bower_components/jquery/jquery.js"></script> <script src="bower_components/handlebars/handlebars.js"></script> <script src="bower_components/underscore/underscore.js"></script> <script src="bower_components/ember/ember.js"></script> <script src="bower_components/ember-animated-outlet/ember-animated-outlet.js"></script> <script src="bower_components/ember-data/ember-data.js"></script> 

I'm not sure if this is relevant, but it is also my controller for the route:

 GambifyApp.BetroundStatsController = Ember.ArrayController.extend({ needs: "betround", queryParams: ['game'], game: null, filteredBets: function() { var game= this.get('game'); var bets = this.get('model'); if (game) { return articles.filterProperty('game', game); } else { return articles; } }.property('category', 'model') }); 
+6
source share
2 answers

This is a bug in the version of Ember that works in canary versions.

http://emberjs.jsbin.com/ucanam/3566/edit

+2
source

They accidentally added request-params-new to v1.4.0-beta3 and removed it from version v1.4.0-beta4. Version 1.4.0 does not have this feature, as well as beta version 1.5.0.

It seems that if you want to continue working with query-params-new parameters, you will need to use Canary build (1.6.0) or return to 1.4.0-beta3.

https://github.com/emberjs/ember.js/issues/4372#issuecomment-35175856

+2
source

All Articles