Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

when new item added in array its not refreshing the list in ember

App.MyController = Ember.ArrayController.extend({
  results: [],
  init: function(){
    _this = this;
    App.MyModel.find({}).then(function(contents) {
      obj1 = contents.objectAt(0);
      obj1.get('data').hasMany.results.forEach(function(item){
        _this.results.pushObject(item)
      });
    })
    //rest of the code
  }
});
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #item #added #array #refreshing #list #ember
ADD COMMENT
Topic
Name
8+7 =