我下载了AngularFire种子,我正在尝试更改我正在从事的项目的路线,但到目前为止我还没有成功。我只是将 ' /home
' 更改为 ' /
' 和 ' /chat
'更改为 ' '/selectcard
和' /login
' 更改为 ' /cardcredentials
',因此,我还更改了 .html 模板的名称。
现在我在部署的应用程序中收到空白页。我已经倾注了角度 ngroute 文档,但我无法弄清楚我哪里出错了。
.constant('ROUTES', {
'/': {
templateUrl: 'partials/home.html',
controller: 'HomeCtrl',
resolve: {
// forces the page to wait for this promise to resolve before controller is loaded
// the controller can then inject `user` as a dependency. This could also be done
// in the controller, but this makes things cleaner (controller doesn't need to worry
// about auth status or timing of displaying its UI components)
user: ['simpleLogin', function(simpleLogin) {
return simpleLogin.getUser();
}]
}
},
'/SelectCard': {
templateUrl: 'partials/selectcard.html',
controller: 'ChatCtrl'
},
'/CardCredentials': {
templateUrl: 'partials/cardcredentials.html',
controller: 'LoginCtrl'
},
'/OffersDetails': {
templateUrl: 'partials/offerdetails.html',
controller: 'AccountCtrl',
// require user to be logged in to view this route
// the whenAuthenticated method below will resolve the current user
// before this controller loads and redirect if necessary
authRequired: true
}
})