Skip to content

Instantly share code, notes, and snippets.

@daveduchene
Created June 8, 2012 01:09
Show Gist options
  • Select an option

  • Save daveduchene/2892802 to your computer and use it in GitHub Desktop.

Select an option

Save daveduchene/2892802 to your computer and use it in GitHub Desktop.
Load external dependency in Sproutcore
AdminUi.LoadingState = SC.State.extend({
enterState: function() {
SC.MODULE_INFO['arcGis'] = { scriptURL: 'https://serverapi.arcgisonline.com/jsapi/arcgis/?v=2.4' };
SC.Module.loadModule('arcGis', this.arcGisLoaded);
},
arcGisLoaded: function() {
dojo.require('esri.map');
// ...
dojo.require('dijit.Toolbar');
AdminUi.statechart.gotoState('readyState');
}
});
@mauritslamers
Copy link

Nice solution. I added this to my personal notes collection.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment