javascript - RequireJS Undefined Module -


i loading jquery , jquery ui. reason jqueryui undefined , cannot seem figure out why. know path correct because if change incorrect 1 different error, know "loading" cannot figure out why undefined. have loaded many other modules fine, don't know problem is. don't see how including circular dependency, thing have seem found cause this. thank help.

main.js

require.config({     paths: {         'text': '../../scripts/requirejs/text',              'jquery': "../../scripts/jquery/jquery-2.1.1",         'jqueryui': "../../scripts/jqueryui/jquery-ui.min",               'app': 'app'     },     shim: {         'app': {             deps: [ 'kendovendor']         },        'jqueryui': {             deps: ['jquery']         }     } }); 

then try load in view model:

define(['jqueryui', 'jquery'], function (jqui, jq) {     //jqui undefined, jq not.     ... } 

jquery ui built on top of jquery. don't think can directly call members. try call of jui functions (for example $(..some input button.. ).button() ) , should work. defining module should sufficient:

define([  'jquery', 'jqueryui' ], function (jq)  { //jq(..).button(); } 

Comments

Popular posts from this blog

java - Plugin org.apache.maven.plugins:maven-install-plugin:2.4 or one of its dependencies could not be resolved -

Round ImageView Android -

How can I utilize Yahoo Weather API in android -