结合AngularJS,HTML5位置和超大型

我一直在使用nodejs http-server来为我的Angular应用程序提供服务,但是它不适用于HTML5位置,因为使用它们需要服务器redirect,而http-server不这样做。 所以我看到了一个build议尝试超大型 ,并安装它。 然后我设置了以下superstatic.json文件:

{ "routes": { "Admin/**":"/index.html", "Give/**":"/index.html", "Pending/**":"/index.html", "Store/**":"/index.html" } } 

我用它启动了它

 superstatic --config superstatic.json 

虽然它正确地提供了我的应用程序,如果我在“/”开始,重新加载index.html文件,但不要做任何文件的angular度处理。

有没有人成功地使用angular质超大型?

我通过设置我的superstatic.json这样完成了我的工作:

 { "rewrites": [ {"source":"/**","destination":"/index.html"} ] } 

然后运行它

 superstatic --config superstatic.json 

下面的superstatic.jsonconfiguration适用于AngularJS和HTML5模式。

 { "routes": [ {"**": "index.html"} ] } 

除非您有特定的路由或状态要求,否则不需要在configuration中指定每个路由组合。