我有一个Ionic 4 PWA项目,需要添加一个标准的html页面,我可以通过网址直接访问。
问题是当我在根目录(src / app / test.html)或文件夹(src / app / folder / test.html)中添加html页面时,我无法通过url直接访问它 - myweb.com/folder /test.html
但是,如果我把它放在我的资产文件夹(src / assets / test.html)中,我可以通过url直接访问它 - myweb.com/assets/test.html
那么我需要设置什么才能访问root或特定文件夹中的html?
Ionic / Angular PWA通常使用一个主机文件,即从中加载PWA的index.html。加载PWA后,导航将由Angular's Router处理。
按照惯例,静态资产从assets目录提供。