javascript - System JS load multiple dependencies in one call -


looking @ docs systemjs can not find example of loading multiple dependencies @ same time. expect api like...

system.import(['jquery.js','underscore.js']).then(function($, _) {     // ready go both jquery , underscore... }); 

i expect use promises load dependencies in parallel, , execute callback once complete. possible? if not, there reason why functionality not implemented?

this possible promise.all:

promise.all([     system.import('jquery'),     system.import('underscore') ]).then(function(modules) {     var jquery = modules[0];     var underscore = modules[1]; }); 

but ugly can see. there talk of considering allowing array example @ spec level, need in module spec since spec loader.

the better alternative have 1 entry point application, app.js , have load dependencies.


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -