jeudi 26 février 2015

Using require to pull in a dynamically created resource path


I would like to generate a resource location dynamically and use RequireJS to retrieve it.



var resource = 'foo' + 'bar';

require([resource], function(manifest) {
// This is never run :(
});


When I run this however, the contents of the callback is never run. Why is this?





Aucun commentaire:

Enregistrer un commentaire