我有一个Ionic 4 PWA项目,需要添加一个标准html页面,可以直接通过url访问。
问题是当我在根目录(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
访问它那我需要设置什么才能访问根目录或特定文件夹中的html?
答案 0 :(得分:0)
Ionic / Angular PWA通常使用一个主机文件,即index.html,从中加载您的PWA。加载PWA后,导航将由Angular's Router处理。
根据约定,静态资产是从assets目录提供的。