angular routeProvider找不到模板网址

时间:2018-04-23 19:05:12

标签: angularjs ngroute

大家好我有这样的设置:

$routeProvider.when('/login', {
           templateUrl: 'partials/login.html',  
           controller:'queriesController',
        })
        .when('/', {
                templateUrl:'partials/tables.html',
                controller:'queriesController',
                resolve: {
                    environments: function (RefDataService) {
                        return RefDataService.getEnvironments();
                    }
                }
            })
            .when('/transactions', {
                templateUrl:'partials/transactions.html',
                controller:'transactionsController'
            })
            .otherwise({redirect:"/"});

但是当我ping我的链接时:

http://localhost:8080/blah/#/login

我刚接到我的其他网页。在这种情况下,它将是tables.html。有没有理由说它可能没有使用/ login或不使用我的templateUrl。如果重要的话,这是一个tomcat应用程序,它在我添加new / login之前工作。

0 个答案:

没有答案
相关问题