angularjs路由错误链接

angularjs路由错误链接,angularjs,cordova,angular-routing,Angularjs,Cordova,Angular Routing,我正在一起使用cordova angularjs。我将使用routeprovider。 index.js: var appGenerator = angular.module('appGenerator', ['ngRoute', 'ngResource']); appGenerator.config(function ($compileProvider) { $compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|ftp|ma

我正在一起使用cordova angularjs。我将使用routeprovider。 index.js:

var appGenerator = angular.module('appGenerator', ['ngRoute', 'ngResource']);

appGenerator.config(function ($compileProvider) {
    $compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|ftp|mailto|file|tel):/);
});

        appGenerator.config(['$routeProvider' function ($routeProvider) {

         $routeProvider
             .when('/', {
                templateUrl: "partials/tablePage.html",
                 controller: "MainCtrl"
             })
             .when('/contacts', {
                 templateUrl: "partials/contacts.html",
                 controller: "ContactsCtrl"
            }).otherwise({
                 redirectTo: '/'
             }); }]);
html:


但是我得到一个
net::ERR\u文件\u未找到(file:///contacts)
错误


我做错了什么

使用
ngHref
代替
href
也尝试过。但同样的问题。我有同样的问题,但通过调用
$location.path('/contacts')解决了它ng中,单击
元素上的
处理程序。
<a href="#/{{table.tablename}}" onclick="callTable()">{{table.tablename}}</a>