You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, according to the docs page the require method can take either an object or an array of objects.
But I can't seem to use it with an array. I want to use it with array b/c I'm loading the names of the scripts dynamically and it will be easiest if I'll just send it as an array instead of requiring them one by one.
It seems like the trivial use case for multiple files. What am I missing?
Thanks!
The text was updated successfully, but these errors were encountered:
Not array of objects, but all objects one by one, only possible way is to use function.apply. @ray007 You are absolutely right, this worked for me flawlessly. basket.require.apply(basket, scripts).then(function () { //sucess }, function (error) { //error });
Hi, according to the docs page the require method can take either an object or an array of objects.
But I can't seem to use it with an array. I want to use it with array b/c I'm loading the names of the scripts dynamically and it will be easiest if I'll just send it as an array instead of requiring them one by one.
It seems like the trivial use case for multiple files. What am I missing?
Thanks!
The text was updated successfully, but these errors were encountered: