content: Angular PWA guide is missing the angular.json step for Angular 18+
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 半天
- 新手友好度
- 78/100
- Issue 类型
- 文档
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- angular
调研方向
打开 https://ionicframework.com/docs/angular/pwa 上的 Angular PWA 指南并检查设置说明,尤其是 ng add 步骤和 ngsw-config.json 示例。记录 angular.json 中的 assets 条目,内容为 { "glob": "**/*", "input": "public" },并针对 Angular 18+ 更新示例;完成的标准是指南涵盖生成的 public 文件以及 Web 根目录 manifest 的行为。
由索引模型根据 Issue 内容生成。
描述
URL
https://ionicframework.com/docs/angular/pwa
Issue Description
The guide's only setup step is ng add @angular/pwa, which was accurate before Angular 18 but is no longer sufficient for a project created with ionic start.
Since Angular 18 the pwa schematic writes manifest.webmanifest and the icons to public/ and no longer adds an entry to angular.json. The Ionic starter's angular.json has no public asset glob, so those files are never copied into www/. On a host with a SPA rewrite the 404 is served as index.html and the browser reports Manifest: Line: 1, column: 1, Syntax error.
The page should tell readers to add the public glob to the assets array after running the schematic:
{ "glob": "**/*", "input": "public" }
Note there is deliberately no output key, so the files land at the web root and match the <link rel="manifest" href="manifest.webmanifest"> the schematic injects into index.html.
The ngsw-config.json sample on the page is also stale relative to what Angular 18+ generates and worth refreshing at the same time.
Reported in ionic-team/starters#1888, which covers the starter-side fix.
- 主要语言
- MDX
- 星标
- 621
- 派生
- 3.2k
- 平均合并
- 1 天 2 小时
- 30 天内合并 PR
- 86
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
ionic-team/ionic-docs 的其他 Issue
-
content
难度 2/5 1-3 小时 新手友好度 86/100
ionic-team/ionic-docs#4705 ·
-
triage
难度 1/5 1 小时以内 新手友好度 80/100
ionic-team/ionic-docs#4546 ·
-
content
难度 2/5 1-3 小时 新手友好度 68/100
ionic-team/ionic-docs#4381 · 2 条评论 ·
-
triage
难度 1/5 1 小时以内 新手友好度 72/100
ionic-team/ionic-docs#3639 ·
-
content package: angular
难度 2/5 1-3 小时 新手友好度 62/100
ionic-team/ionic-docs#3583 ·
查看 ionic-team/ionic-docs 的全部 Issue
相似的 Issue
-
sync-en
难度 1/5 1-3 小时 新手友好度 88/100
-
难度 2/5 1-3 小时 新手友好度 78/100
agilepathway/label-checker#640 ·
-
难度 2/5 1-3 小时 新手友好度 75/100
BasedHardware/omi#15662 · 1 条评论 ·
-
documentation help wanted
难度 2/5 1-3 小时 新手友好度 90/100
-
难度 1/5 1-3 小时 新手友好度 88/100