Quantcast
Channel: Ember.JS - Latest topics
Viewing all articles
Browse latest Browse all 4838

Then not working in destroyRecord

$
0
0

@celo wrote:

I'm using the following code to delete all my itens that have the checked attribute, checked:

delete () {
  let model = this.get('model');

  model.forEach(item => {
    if (item.get('checked')) {
      item.destroyRecord().then((result) => {
        console.log(result);
      });
    }
  });
},

I would like to provide some feedback to the user like "item deleted with success".. but the then is not being called. What could be the problem here?

Thanks.

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 4838