0
我使用$stateProvider
中的解決方案。我不知道爲什麼它甚至沒有解僱。甚至沒有加載控制器。另外,我在控制檯上沒有收到任何錯誤。我錯過了什麼嗎?解決不在角ui路由器發射
var commonModule = angular.module('menaAdolescentFS.common',['ui.router'])
.config(function ($stateProvider, $urlRouterProvider) {
$urlRouterProvider.otherwise("/offices")
$stateProvider
//.state('/', {
// url: '',
// template: ''
//})
.state('offices', {
url: '/offices',
templateUrl: 'Scripts/app/templates/offices.html',
controller: 'officesController',
resolve: {
userSession : function(sessionService){
return sessionService.getUserSession();
}
}
})
});
'sessionService.getUserSession()'return a promise? – svarog
你在哪裏援引決心? – Vivz