我正在用angularjs路由开发asp.net mvc项目。在重新载入页面时产生一些路由错误。在我的应用程序中,Angularjs路由错误
如果我重新加载页面,此页面正常工作。但是,如果我重新加载下一页,它会在'/'应用程序中显示服务器错误。 HTTP:404错误。
.when('/computer', {
templateUrl: '/Selection_Routing/Selection_Product/Laptop.html',
controller: 'LaptopController'
})
我很感谢你的回答。
可能是旧的回答可以帮助你“ [http://stackoverflow.com/questions/20307655/404-error-with-angularjs-templateurl-routing](http://stackoverflow.com/questions/20307655/404-error-with-angularjs-templateurl-routing) “ – Ronald
html5Mode是真的吗? – dfsq
如果您使用Html5Mode,您的服务器需要配置以及角度。你使用什么服务器技术?编写UI-Router的人也编写了一个非常好的常见问题解答,讨论了这个问题并给出了很多流行服务器的配置选项:https://github.com/angular-ui/ui-router/wiki/Frequently-Asked-Questions#如何配置您的服务器到工作与html5mode – Claies