PDA

View Full Version : How to load external files



cyberwombat
8 Nov 2011, 1:09 PM
I have a sencha touch 2 app where I want to load files using ext.require - I am not sure how to specify the location - I guess some kind of namespace alias?



Ext.Loader.setConfig({ enabled: true });
Ext.require(["MyApp.Util"]);


My file is in some app/lib/ folder - the console says file: MyApp/Util.js not found

mitchellsimoens
9 Nov 2011, 6:49 AM
You need to set a path for the namespace.

http://docs.sencha.com/ext-js/4-0/#!/api/Ext.Loader-cfg-paths