1

このレポを複製し、フォルダー構造に従って jquery.mobile.router.js を配置します。これが私のrequirejs構成です

//bootstrap.js content

require.config({
    // The shim config allows us to configure dependencies for
    // scripts that do not call define() to register a module
    shim: {

        underscore: {
            exports: '_'
        },
        jquery: {
            exports: 'jquery'
        },
        backbone: {
            deps: [
                'underscore',
                'jquery'
            ],
            exports: 'Backbone'
        },
        backboneLocalstorage: {
            deps: ['backbone'],
            exports: 'Store'
        },
        jQueryMobile : {
            deps:['jquery'],
            exports: "jQueryMobile"
        }
    },
    paths: {

        jquery: 'js/vendor/jquery',
        jQueryMobile: 'js/vendor/jquery.mobile.min',
        underscore: 'js/vendor/underscore.min',
        backbone: 'js/vendor/backbone',
        backboneLocalstorage: 'js/plugins/localStorage',
        text: 'js/plugins/text',
        'jquery.mobile.router': 'js/plugins/jquery.mobile.router'

}
});

すべてのスクリプトは正常にロードされていますが、jquery.mobile.router はロードされていません。私のフロダー構造は次のとおりです

/app
/js
  |-plugins
      |-jquery.mobile.router.js
/bootstrap.js

誰が私が間違っているのか教えてもらえますか? 前もって感謝します。

4

1 に答える 1

0

以下のような場所で jquery.mobile.router を呼び出しましたか

require(['jquery.mobile.router'], function () {
});
于 2013-07-15T09:38:37.813 に答える