gpt4 book ai didi

ember.js - Handlebars 错误 : Could not find property 'query-params' although Feature activated

转载 作者:行者123 更新时间:2023-12-04 15:22:55 24 4
gpt4 key购买 nike

我试图在我的路线/ Controller 中使用查询参数,但 Handlebars 助手导致了这个错误:

Uncaught Error: <(subclass of Ember._MetamorphView):ember689> Handlebars error: Could not find property 'query-params' on object .



此错误是由此帮助程序链接引起的:
{{#link-to 'betround.stats' (query-params game=id) }}
<li {{bind-attr class="isPast:small"}}> {{team1}} {{scoreT1}} : {{scoreT2}} {{team2}} (gameid: {{id}})</li>
{{/link-to }}

我已经升级了 Ember 和 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

以及启用 query-params-new 功能:
    <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>

我不确定它是否相关,但这也是我的路线 Controller :
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')
});

最佳答案

这是 Ember 版本中的一个错误,它在金丝雀版本中工作。

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

关于ember.js - Handlebars 错误 : Could not find property 'query-params' although Feature activated,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21502806/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com