We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi,
I'm trying to get this going with require.js. I have the following:
// Configure loading modules from the lib directory, // except 'app' ones, requirejs.config({ "baseUrl": "js/lib", "paths": { "common-functions": "common-functions", "domReady": "domready", "storage": "storage", }, "shim": { "common-functions": { //"deps": ["jquery","datepicker","domReady"] "deps": ["storage","domReady"] } } }); require(['storage'], function(store) { require(['domReady','common-functions'], function(domReady){ store.set("foo","bar"); // this works ok! }, function (err) { console.log("Error: " + err) }); });
It works like this as "store" is available - however, if I were to use it in the test common-functions.js, I get an undefined value for store:
common-functions.js =>
store.set("foo","bar");
ReferenceError: store is not defined
Do I need to wrap common-functions.js with something to make it work?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi,
I'm trying to get this going with require.js. I have the following:
It works like this as "store" is available - however, if I were to use it in the test common-functions.js, I get an undefined value for store:
common-functions.js =>
store.set("foo","bar");
Do I need to wrap common-functions.js with something to make it work?
The text was updated successfully, but these errors were encountered: