您好,欢迎来到化拓教育网。
搜索
您的当前位置:首页Angular默认加载一个模块

Angular默认加载一个模块

来源:化拓教育网

今天下午,在页面上面建立两个angular app后发现第二个模块不起作用。在网上一查,发现一个页面一般默认一个模块生效,如果要多个模块需要手动加入。

    // 手动加载多个模块
    angular.bootstrap(document.getElementById("map"), ['mapApp']);
    angular.bootstrap(document.getElementById("toggleData"), ['toggleDataApp']);
    angular.bootstrap(document.getElementById("dataView"), ['dataViewApp']);

Copyright © 2019- huatuo9.cn 版权所有 赣ICP备2023008801号-1

违法及侵权请联系:TEL:199 1889 7713 E-MAIL:2724546146@qq.com

本站由北京市万商天勤律师事务所王兴未律师提供法律服务