mardi 6 septembre 2016

Ember-table dynamically add a new row

I am looking at this example here:

http://ift.tt/2bRoxRY

Content is made with the tableContent function. How would you add to this table dynamically? i.e call tableContent with five new values to be added to a new row when you need to dynamically add a new row:

tableContent: function(newDate, newOpen, newHigh, newLow, newClose) {
    var generatedContent = [];
    generatedContent.push({
        date:   newDate,
        open:   newOpen,
        high:   newHigh
        low:    newLow,
        close:  newClose
     });
   }
   return generatedContent;
 }.property()




Aucun commentaire:

Enregistrer un commentaire