'use strict';
angular.module('confusionApp', ['ui.router'])
.config(function($stateProvider, $urlRouterProvider) {
$stateProvider
// route for the home page
.state('app', {
url:'/',
views: {
'header': {
templateUrl : 'views/header.html'
},
'content': {
template : '<h1>To be Completed</h1>',
controller : 'IndexController'
},
'footer': {
templateUrl : 'views/footer.html'
}
}
})
// route for the aboutus page
.state('app.aboutus', {
url:'aboutus',
views: {
'[email protected]': {
template: '<h1>To be Completed</h1>'
}
}
})
// route for the contactus page
.state('app.contactus', {
url:'contactus',
views: {
'[email protected]': {
templateUrl : 'views/contactus.html',
controller : 'ContactController'
}
}
})
// route for the menu page
.state('app.menu', {
url: 'menu',
views: {
'[email protected]': {
templateUrl : 'views/menu.html',
controller : 'MenuController'
}
}
})
// route for the dishdetail page
.state('app.dishdetails', {
url: 'menu/:id',
views: {
'[email protected]': {
templateUrl : 'views/dishdetail.html',
controller : 'DishDetailController'
}
}
});
$urlRouterProvider.otherwise('/');
});
을 주입하려고 할 때 오류가 나는 UI-의 각도 의존성을 설치하는 정자를 사용 라우터. 그들은 현재 태그에 포함시킬 때 올바른 경로를 가지고 있습니다. 파일이 bower_components 파일 내부에도 있는지 확인했습니다. 그러나 프로그램을 실행할 때 아무 것도 나타나지 않고 내가받는 유일한 오류는 "Uncaught Error : [$ injector : modulerr]"오류입니다. 스크립트를로드하기 전에나는 UI-라우터를 사용하려고하고있는 app.js 파일의 경우 UI-라우터