0
为什么我收到此错误? state.js文件很简单无法从状态'home'解析'___'
(function() {
'use strict';
angular
.module('theFoodApp')
.config(stateConfig);
stateConfig.$inject = ['$stateProvider'];
function stateConfig($stateProvider) {
$stateProvider.state('concludi', {
parent: 'app',
url: '/concludi-acquisto',
views: {
'[email protected]': {
templateUrl: 'app/pages/carrello/concludi-acquisto/concludi-acquisto.html',
controller: 'ConcludiAcquistoController',
controllerAs: 'vm'
}
}
});
}
})();
模板页面存在于指定的路径和控制器中。 在其他页面我已经与UI的SREF按钮=“concludi”但是当我按下它,我收到此错误
Error: Could not resolve 'concludi' from state 'home'
at Object.transitionTo (angular-ui-router.js:3180)
at Object.go (angular-ui-router.js:3108)
at angular-ui-router.js:4159
at angular.js:19612
at completeOutstandingRequest (angular.js:5964)
at angular.js:6243
ui.router被导入到app.module.js中 – Dennis
噢好吧,是的,考虑它会引发一个不同的错误。 uirouter脚本导入是否出现在app.module.js导入之前? –
你在导入state.js吗? –