jeudi 14 juillet 2016

EmberJS, Error of 'not found' trying to import a Model from a Service

I have this Model

# /app/models/my-model.js
import Model from 'ember-data/model';

export default Model.extend({
});

I try to import it from this Service:

# /app/services/db.js
import Ember from 'ember';
import MyModel from '../models/my-model.js';

export default Ember.Service.extend({
});

But It keeps saying the error:

Error: Could not find module `my-app/models/my-model.js` imported from `my-app/services/db`




Aucun commentaire:

Enregistrer un commentaire