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') });
source share