I have this error from time to time when I transition from one route to another :
当我从一条路线转换到另一条路线时,我偶尔会遇到这个错误:
Uncaught Error: Assertion Failed: Attributes must be numbers, strings or booleans, not function (data) {
return template
.replace(/\{\{\{\s*(.*?)\s*\}\}\}/g, function(i, match) {
// tripple curlies -> no-escaping
return get(data, match);
}).replace(/\{\{\s*(.*?)\s*\}\}/g, function(i, match) {
return escapeExpression( get(data, match) );
});
}
I'm using "ember-cli": "0.2.5"
, "ember-data": "1.0.0-beta.19"
and "ember": "1.12.0"
.
我正在使用“ember-cli”:“0.2.5”,“ember-data”:“1.0.0-beta.19”和“ember”:“1.12.0”。
I don't have a clue where that could come from, any lead please ?
我不知道哪里可以来,请问任何领导?
1 个解决方案
#1
1
It looks like Ember Handlebars template error. I guess you have computed property that doesn't properly defined and used in template.
它看起来像Ember Handlebars模板错误。我猜你有计算属性没有在模板中正确定义和使用。
By "not properly defined" I mean you might forget to add }.property()
at the end
“没有正确定义”我的意思是你可能忘记在最后添加} .property()
// as is you have something like this
qwerty: function {
// some code
}
// to be
qwerty: function {
// some code
}.property(),
// or
qwerty: Ember.computed(function {
// some code
}),
Sorry, if my guess is wrong.
对不起,如果我猜错了。
#1
1
It looks like Ember Handlebars template error. I guess you have computed property that doesn't properly defined and used in template.
它看起来像Ember Handlebars模板错误。我猜你有计算属性没有在模板中正确定义和使用。
By "not properly defined" I mean you might forget to add }.property()
at the end
“没有正确定义”我的意思是你可能忘记在最后添加} .property()
// as is you have something like this
qwerty: function {
// some code
}
// to be
qwerty: function {
// some code
}.property(),
// or
qwerty: Ember.computed(function {
// some code
}),
Sorry, if my guess is wrong.
对不起,如果我猜错了。