i having trouble working ember views , initializing them values before template rendered. code below, getting following error in browser:
typeerror: this.currentstate undefined this.currentstate.childviewsdidchange(this, views, start, added);
my question is, error message mean, , there approach work better?
app.smileyfaceview = ember.containerview.extend childviews: null init: () -> @_super happy = app.smileyface.create() happy.setface(":)") angry = app.angryface.create() angry.setface(">:(") blah = app.blahface.create() blah.setface(":|") @pushobject(happy) @pushobject(angry) @pushobject(blah) app.smileyfaceview = ember.view.extend tagname: "span" template: null setface: (face) -> @set('template', ember.handlebars.compile(face))
Comments
Post a Comment