var esmsApp = angular.module('esmsApp', [
// 外部库模块
'ui.router'
]);
esmsApp.config(function($stateProvider, $urlRouterProvider) {
$urlRouterProvider.otherwise('/index');
$stateProvider
.state('index', {
url: '/index',
views: {
'': {
templateUrl: '../view/index.html'
},
'header@index': {
templateUrl: '../view/header.html'
},
'content@index': {
templateUrl: '../view/content.html'
},
'footer@index': {
templateUrl: '../view/footer.html'
},
'modal@index': {
templateUrl: '../view/modal.html'
}
}
})
})
The project structure diagram is as follows:
Error message:
I didn’t find any problem with the logic. Please check why the above program segment reported an error
Your mistake is a punctuation mistake. Look at the quotation marks, commas, etc., they may not be in this program
Module dependency injection error...
If you are not familiar with it, do not use the compressed package and directly quote the source code, which will make it easier to troubleshoot the problem.
There seems to be no problem with this program. Angularjs is more case-sensitive and has full-width and half-width status