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
Using params on to the main() call can be very usefull (flexibility, reusability, ...) : require.run("app/main", [params], cb).
For instance by calling several instance of an application using different parameters ...
Using params on to the main() call can be very usefull (flexibility, reusability, ...) : require.run("app/main", [params], cb).
For instance by calling several instance of an application using different parameters ...
example:
//index.html
[...]
url = http://localhost/app/foo/bar;
require.setModuleRoot(url);
require.run("app", [url]);
[...]
//app.js
[...]
function main(url) {
//some work using url
}
[...]
The text was updated successfully, but these errors were encountered: