App.IndexRoute = Ember.Route.extend({
model: function() {
return ['red', 'yellow', 'blue', 'green'];
}
});是
App.IndexRoute.model吧,直接输入model当然有问题
model: function() {
return ['red', 'yellow', 'blue', 'green'];
}
});是
App.IndexRoute.model吧,直接输入model当然有问题
emberjs.com/about/ Download the starter kit
是这样子吗?
ReferenceError: model is not defined
App.IndexRoute.model
undefined
App.IndexRoute.model.push("green")
TypeError: App.IndexRoute.model is undefined
虽然没有出错,但是这个undefined也说明方式不对?