为什么AngularFire路由呈现空白页面

时间:2014-10-06 07:55:40

标签: routes angularfire ngroute

我下载了 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
    }
  })

1 个答案:

答案 0 :(得分:0)

当你下载angularfire种子时,你必须安装一个凉亭。我不确定为什么这些不会自动安装,因为他们必须在那里让应用程序正常工作。