ConverseJs在angular js Route中出错“错误:请参阅almond README:不正确的模块构建,没有模块名称定义”

时间:2016-04-29 13:40:36

标签: javascript angularjs

我正在尝试使用角度js的ConverseJS。我在页面路由到下一页时遇到路由问题然后我发现了这个错误

  

错误:请参阅almond README:模块构建不正确,没有模块名称   定义

我在做: -

<script type="text/javascript" src="js/converse.min.js"></script>

require(['converse'], function (converse){
  converse.initialize({
    allow_chat_pending_contacts:true,
    allow_contact_requests:true,
    allow_dragresize:false,
    allow_muc:false,
    allow_otr: false,
    allow_registration:false,
    auto_list_rooms: false,
    auto_subscribe: true,
    auto_join_on_invite:true,
    bosh_service_url: 'http://45.55.177.22:5280/http-bind/', // Please use this connection manager only for testing purposes
    debug: false ,
    auto_login:true,
    jid:'jid',
    password:'123',
    hide_muc_server: true,
    message_archiving: 'always',
    i18n: locales['en'], // Refer to ./locale/locales.js to see which locales are supported
    prebind: false,
    show_controlbox_by_default: false,
    xhr_user_search: false,
    image_upload_url: '/chat/image.php'
          });
      });

我在索引页面中使用了此代码,发现此错误

  

错误:请参阅almond README:模块构建不正确,没有模块名称   定义

我也使用ng-view在页面帮助下我在索引页面上路由页面。当我复制此代码并放置在通过路由加载的其他页面中时,它在第一次加载页面时工作正常。

页面完全加载后,我点击其他页面链接,然后我在路由中发现了相同的错误。

  

错误:请参阅杏仁自述文件:模块构建不正确,没有模块名称

所以请帮助我。 定义

0 个答案:

没有答案