我正在做一个相当大的 angularjs 应用程序。目前的设计是每个州 1 个 .html 文件。(每个视图只有 1 个 html。我试图不包含每个页面的多个 html。)
$stateProvider.state('firstState', {
url: '/customer',
templateUrl: 'customer.html'
});
$stateProvider.state('secondState', {
url: '/customerdetail',
templateUrl: 'customerdetail.html'
});
尽管看起来customerdetail状态应该是客户状态的子级,但我将它们分开,即使在 customer.html 中有链接(使用 Ui-router 参数)可以深入了解 customerdetails。
只要满足我的要求,它是一个好的设计吗?