我计划在AngularJS中开发我公司的CRM(客户关系管理)系统.这个系统不小,有客户CRUD,购物车,售后服务等模块.
正如我所注意到的,通常AngularJS只有一个主要的“ng-app”.
>对于系统(每个CRM模块一个),构建多于“ng-app”的问题是否有任何问题?
>它的优点和缺点是什么?
编辑1:我不打算每个HTML使用多个ng-app,但整个应用程序中有很多(约7个).
编辑2:想法是为每个CRM模块创建一个Angular模块,例如:
customer.html
< html lang =“en”ng-app =“crmCustomer”>
angular.module(‘crmCustomer’,[‘customers’]);
sales.html
< html lang =“en”ng-app =“crmSales”>
angular.module(‘crmSales’,[‘customers’,’cart’,’sales’]);
afterSales.html
angular.module(‘crmAfterSales’,[‘客户’,’汇款’]);
< html lang =“en”ng-app =“crmAfterSales”>