结合AngularJS,HTML5位置和超迷

前端之家收集整理的这篇文章主要介绍了结合AngularJS,HTML5位置和超迷前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我一直在使用nodejs http-server来提供我的Angular应用程序,但它不适用于 HTML5位置,因为使用它们需要服务器重定向,而http-server不会这样做.所以我看到了推荐尝试 superstatic并安装它.然后我设置以下superstatic.json文件

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

我推出了它

superstatic --config superstatic.json

虽然如果我以“/”开头它正确地提供了我的应用程序,重新加载index.html文件,但不要对文件进行任何角度处理.

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

解决方法

通过设置我的superstatic.json,我得到了完美的工作:

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

然后运行它

superstatic --config superstatic.json

猜你在找的Angularjs相关文章