【发布时间】:2017-11-11 09:37:48
【问题描述】:
我在我的应用程序中使用 ngRoute。问题是当我重新加载该页面时,出现错误。 错误说 白标错误页面 此应用程序没有显式映射 /error,因此您将其视为后备。
var app = angular.module('myApp',['ngTable','jcs-autoValidate','ngRoute']);
// configure our routes
app.config(function($routeProvider,$locationProvider) {
$routeProvider
.when('/container-details', {
templateUrl : 'container-details-test.jsp',
controller : 'myCtrl'
})
$locationProvider.html5Mode(true);
});
【问题讨论】:
-
您必须在使用 HTML5 模式的服务器配置中添加一些重写规则。
标签: javascript angularjs ngroute