【问题标题】:Ember + Firebase, locationtype = historyEmber + Firebase,位置类型 = 历史
【发布时间】:2015-11-17 14:44:21
【问题描述】:

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

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

【问题讨论】:

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


    【解决方案1】:

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

    来自Firebase documentation for rewrites

    如果您想为多个 URL 显示相同的内容,请使用重写。

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

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

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

    【讨论】:

      猜你喜欢
      • 2013-08-12
      • 1970-01-01
      • 2013-08-24
      • 2018-07-02
      • 1970-01-01
      • 1970-01-01
      • 2016-04-20
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多