结合AngularJS,HTML5位置和超迷

Gre*_*rty 4 http-redirect node.js angularjs

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

{
  "routes": {
    "Admin/**":"/index.html",
    "Give/**":"/index.html",
    "Pending/**":"/index.html",
    "Store/**":"/index.html"
  }
}
Run Code Online (Sandbox Code Playgroud)

我推出了它

superstatic --config superstatic.json
Run Code Online (Sandbox Code Playgroud)

虽然如果我从"/"开始它正确地提供我的应用程序,重新加载index.html文件,但不做任何文件的角度处理.

有没有人成功地使用带角度的迷信?

Lou*_*eda 6

通过这样设置我让我完美地工作superstatic.json:

{
  "rewrites": [
    {"source":"/**","destination":"/index.html"}
  ]
}
Run Code Online (Sandbox Code Playgroud)

然后运行它

superstatic --config superstatic.json
Run Code Online (Sandbox Code Playgroud)