Ember + Firebase,locationtype = history

时间:2015-11-17 14:44:21

标签: ember.js firebase fullpage.js firebase-hosting

我正在使用firebase托管我的ember应用程序,并且想使用locationType = history(url中没有哈希),因为我也使用fullpage.js,它使用#。

所以我的问题是:我可以将firebase配置为仅侦听base-url吗?

1 个答案:

答案 0 :(得分:3)

您正在寻找的是所谓的重写。

来自Firebase documentation for rewrites

  

如果要为多个网址显示相同的内容,请使用重写。

     

可以通过在rewrites文件中定义firebase.json部分来指定网址重写:

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

请务必阅读文档,因为您可以使用这些规则做更多事情。

相关问题