[英]Angularjs: Node server that supports html5mode?
I'm locally developing an Angularjs app. 我在本地开发Angularjs应用。 I'm using the same node web server as in the Angularjs tutorial .
我正在使用与Angularjs 教程中相同的节点Web服务器。 The link to the code for the web-server on Github .
Github上的Web服务器代码的链接 。
The problem is that I can't seem to get html5mode to work on the node server. 问题是我似乎无法在节点服务器上使用html5mode。 What I understand so far is that i have to add a base href to my app and rewrite the server code.
到目前为止,我所了解的是我必须向应用程序添加基本href并重写服务器代码。 I tried rewriting the node web server code, but I failed and it didn't work.
我尝试重写节点Web服务器代码,但是失败了,并且没有用。 Could someone please help me in what i should exactly change?
有人可以帮我做些我应该改变的事情吗? Or does someone maybe already has a version of the server rewritten?
还是有人可能已经重写了服务器的版本?
The link to my app looks like this: http://localhost:8000/app/index.html
我的应用程序的链接如下所示:
http://localhost:8000/app/index.html
Also refreshing the page on a html5 link doesn't work. 同样,刷新html5链接上的页面不起作用。 Like this:
http://localhost:8000/schedule
. 像这样:
http://localhost:8000/schedule
。
Thanks 谢谢
您必须重写未发送到REST端点的传入请求,该响应与对/app/index.html的请求具有相同的响应。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.