我正在使用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:
<a href="#/{{table.tablename}}" onclick="callTable()">{{table.tablename}}</a>
但我收到net::ERR_FILE_NOT_FOUND(file:///contacts)
错误
我做错了什么?