dimanche 23 avril 2017

How can I extend DS.Store in an Ember Application?

I want to add a function to the store as part of a web sockets plugins I am working on.

As part of this, I need to extend the store (DS.Store).

I have tried putting the following file in both app/store.js & app/stores/application.js but this does not seem to work.

import DS from 'ember-data';

export default DS.Store.extend({
  init: function() {
    console.log('Using custom store!');
    return this._super.apply(this, arguments);
  }
});

Do I need to put this somewhere else?




Aucun commentaire:

Enregistrer un commentaire