【发布时间】:2017-10-30 21:03:25
【问题描述】:
假设在我的 Firebase 公用文件夹中,我有一个 index.html 和一个 salon.html。
现在对于像 xyz.com/salon/43 这样的网址,我想加载 salon.html 并在 javascript 中从实时数据库中获取沙龙 43。
现在我可以拥有像xyz.com/salon?id=43 这样的网址。我想知道是否可以在 Firebase 托管中进行前者,如果可以,如何做。
【问题讨论】:
-
您也可以使用动态托管:firebase.google.com/docs/hosting/functions
-
谢谢!我不知道云功能可以这样使用。
...you can have a URL like /blog/<id-for-blog-post>. This URL pattern can be pointed to a function that dynamically uses the URL blog post ID parameter to retrieve content dynamically from your Firebase Realtime Database.
标签: javascript firebase frontend firebase-hosting