我试图从浏览器中码的手动重新加载页面,但它不工作,说Angularjs路由不工作重新加载页面手动
Cannot GET /rate/4
我的路由时:
angular.module('routing')
.config(function ($routeProvider, $locationProvider) {
$routeProvider
.when('/', {
templateUrl: 'app/views/index.html'
})
.when('/rate/:cid', {
templateUrl: 'app/views/rate.html'
})
.otherwise({
'redirectTo': '/'
});
$locationProvider.html5Mode(true);
});
我的假设是当我重新加载主(index.html)不加载这是我的基本html文件。
由于您使用'html5mode',因此您将需要服务器端配置。 –
@ AlbertoI.N.J。我是新手......不知道你的意思是什么 – user3100209
你在用什么服务器? –