javascript - How many dependencies to I need to list in nested require calls? -
i have question. have module following :
define(['jquery', 'amodule', 'anothermodule'], function () { .... }
lets assign above module name 'mymodule' in requirejs config file.
in other file this:
require(['myconfigfile'], function () { require['mymodule'], function(module) { } }
do need require modules part of 'mymodule' definition in nested require statement well?
no,
requirejs 'translate' 'jquery', 'amodule', 'anothermodule'
.
in other words, first load modules 'jquery', 'amodule', 'anothermodule' before loading 'mymodule'
Comments
Post a Comment