Rutwick Gangurde
Rutwick Gangurde

Reputation: 4912

Ext Js 4 - Change the order of files loading

When my Ext Js application loads up, I get an error for a missing class. I checked the console's Net tab and found out that the files are loaded in wrong order. Meaning the class which requires another class to work is loaded after that class. Is there a way to change the loading order of files in Ext Js?

Upvotes: 1

Views: 380

Answers (1)

matt
matt

Reputation: 4047

Use a requires config in the depending class:

Ext.define('Depender', {
    requires: 'Dependee',

    // ...
});

This will tell the loader, that class Dependee must be loaded before class Depender can be instantiated.

Upvotes: 1

Related Questions