0
我启动服务器后,当我单击链接到这些页面时,它工作正常。但是当我刷新页面失败时,似乎将路由URL发送到服务器并且找不到。后端是弹簧安置刷新时AngularJS路由失败
app.config([ '$routeProvider', '$locationProvider',
function($routeProvider, $locationProvider) {
$locationProvider.html5Mode(true).hashPrefix('!');
$routeProvider.when('/k3/test', {
controller : 'liantestCtrl',
templateUrl : '/views/lian.html'
})otherwise({
redirectTo : '/k3/fu'
});
} ]);
错误:
HTTP ERROR 404
Problem accessing /k3/test. Reason:
Not Found
Powered by Jetty://
我需要任何其它设置
你也必须配置@服务器,因为你使用'html5mode'为'true'。 [看看@ **服务器端**](https://docs.angularjs.org/guide/$location) – Jai 2014-11-25 09:02:35