我正在尝试在名为Maintenence的新菜单中移动一些管理菜单视图(即会话,API等)。我在应用程序内部创建了具有更新文件的文件夹,并使用新路径更改了index.html。每当我尝试访问此状态时,我都会收到错误:无法解决' _'来自州' site'。我有什么遗失的吗?
文件夹结构:
part of index.html
<script src="scripts/app/maintenance/sessions/sessions.js"></script>
<script src="scripts/app/maintenance/sessions/sessions.controller.js"> </script>
part of sessions.js
'use strict';
angular.module('customerApp')
.config(function ($stateProvider) {
$stateProvider
.state('sessions', {
parent: 'maintenance',
url: '/sessions',
data: {
authorities: ['ROLE_SUPERADMIN'],
pageTitle: 'global.menu.account.sessions'
},
views: {
'content@': {
templateUrl: 'scripts/app/maintenance/sessions/sessions.html',
controller: 'SessionsController'
}
},
resolve: {
translatePartialLoader: ['$translate', '$translatePartialLoader', function ($translate, $translatePartialLoader) {
$translatePartialLoader.addPart('sessions');
return $translate.refresh();
}]
}
});
});
maintenance.js
'use strict';
angular.module('customerApp')
.config(function ($stateProvider) {
$stateProvider
.state('maintenance', {
abstract: true,
parent: 'site'
});
});