我正在浏览EmberJS文档,在这里遇到了一个绊脚石:
ITEM CONTROLLER
It is often useful to specify a controller to decorate individual items in the ArrayController while iterating over them. This can be done in the ArrayController definition:
App.SongsController = Ember.ArrayController.extend({
itemController: 'song&
App.Controller = Ember.ObjectController.extend({
timerStart: function () {
this.timer = setInterval(this.ctimer, 1000);
},
timerEnd: function () {
this.clearInterval(this.ctimer);
},
ctimer: function () {
var d = new Date();
document.getE
我正在使用Emeber.js框架;我创建了一个对象,如下所示:
myApp.user=Ember.Object.extend({
name:null,
state:false
});
我还这样定义了一个Ember模型:
myApp.Wuser = DS.Model.extend({
nome: DS.attr('string'),
user: DS.attr('mycustomtype') // i want put here a mycustom type (user)
});
问题是:我如何创建一条记录?我试着这样写