arguments - requirejs callback parameter is undefined -


i'm starting require.js. here's simple code have in main.js

    require.config({         baseurl: '/js',     });      require(['lib/jquery-min'], function(jq){         console.log (jq);   // returns "undefined"     }); 

in require function above, argument jq returned empty. can me identify issue here?

answer: requirejs loading jquery when configure path option

require.config({     baseurl: '/js',     paths: {         jquery: 'lib/jquery-min'     } });  require(['lib/jquery-min'], function(jq){     console.log (jq);   // works now!!! }); 

Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -