Ionic 4 PWA-在Ionic项目中添加标准html页面

时间:2019-03-20 15:13:59

标签: ionic-framework progressive-web-apps

我有一个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?

1 个答案:

答案 0 :(得分:0)

Ionic / Angular PWA通常使用一个主机文件,即index.html,从中加载您的PWA。加载PWA后,导航将由Angular's Router处理。

根据约定,静态资产是从assets目录提供的。

另请参阅:The Angular Style Guide