lundi 27 juillet 2015

ember containerview not update

I have defined a container view, and I want to dynamically add child view to property 'childviews' ,then I have the code below:

export default Ember.ContainerView.extend({
  childViews:['testView'],
  testView:InfopanelView.create(),
  testView2:InfopanelView.create(),
  init:function(){
    this._super();
  },
  addSuccessMessage:function(){    
    this.pushObject(this.get('testView2'));
    console.log(this.get('childViews'));
  }
});

when the method addSuccessMessage was called the childViews will have 2 children,but the page seems not updated,so what is the problem




Aucun commentaire:

Enregistrer un commentaire