0

I concatinate my application code from multiple js files into one js file. Therefore I can't control the order, and to be honest would not want to. To specify a custom adapter with ember-model you need to create an instance of it like so:

App.User.adapter = Ember.CustomAdapter.create();

So if the CustomAdapter's code appears after the above statement I get the [Uncaught TypeError: Cannot call method 'create' of undefined] error.

App.User.adapter = App.CustomAdapter.create();

App.CustomAdapter = Ember.Adapter.extend({
    // custom
});

Is there a way around this?

Denzo
  • 431
  • 1
  • 4
  • 15

1 Answers1

0

The order of code loading is very, very important. That's just a fact of life. You need to either figure out how to make your current tool load things in the order that you want, or you need a new tool.

Jeremy Green
  • 8,547
  • 1
  • 29
  • 33