Reputation: 5242
I'm trying to load "Ext.ux.CheckColumn" and using the following code:
Ext.Loader.setConfig({enabled: true});
Ext.Loader.setPath('Ext.ux', '../ux');
Ext.require(['Ext.ux.CheckColumn', '*']);
The Ext scripts are located at:
/Scripts/Library/Ext
The ux folder is at:
/Scripts/Library/Ext/ux
My script in which I'm using loader is located at:
/Scripts/MyApp/Module/jsFile.js
And my web page is located at:
/moudleFolder/mypage.aspx
I'm getting error: namespace is undefined
PS: I'm using Ext4 and I'm using the above code snippet outside of ready method
Upvotes: 1
Views: 4773
Reputation: 22386
Note that all relative paths are relative to the current HTML document.(docs)
So, I believe in your case you should replace your path with:
Ext.Loader.setPath('Ext.ux', '../Scripts/Library/Ext/ux');
Upvotes: 1