-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(pwa): support pwa using ng tools
- Loading branch information
Showing
16 changed files
with
210 additions
and
194 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,7 +47,7 @@ commitizen init cz-conventional-changelog --save --save-exact | |
- [x] 主题切换示例 | ||
- [x] 常用组件 | ||
- [x] 二维码扫描 | ||
- [ ] PWA | ||
- [x] PWA | ||
- [ ] Cordova 插件说明与示例 | ||
- [ ] 用户行为统计 | ||
- [ ] 技巧与工具分享 | ||
|
@@ -159,6 +159,18 @@ see: [tools](./doc/tools.md) | |
一个高大上的 App 肯定少不了换肤功能,但是 Ionic 已经足够好,已经帮我们实现大部分了,具体实现可以参考: | ||
https://ionicframework.com/docs/theming/ | ||
|
||
## PWA | ||
|
||
集成教程可以参见: | ||
https://www.joshmorony.com/create-a-pwa-with-angular-service-workers-in-ionic-4/ | ||
需要注意的是,ionic4 目前是基于 Angular6 进行开发,所以安装时需要指定之前的版本 | ||
|
||
```bash | ||
ng add @angular/[email protected] --project app | ||
``` | ||
|
||
可以参见 issue: https://github.com/angular/angular-cli/issues/12914 | ||
|
||
## 参考 | ||
|
||
https://github.com/marcoturi/ionic-boilerplate | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
"index": "/index.html", | ||
"assetGroups": [ | ||
{ | ||
"name": "app", | ||
"installMode": "prefetch", | ||
"resources": { | ||
"files": [ | ||
"/favicon.ico", | ||
"/index.html", | ||
"/*.css", | ||
"/*.js" | ||
] | ||
} | ||
}, { | ||
"name": "assets", | ||
"installMode": "lazy", | ||
"updateMode": "prefetch", | ||
"resources": { | ||
"files": [ | ||
"/assets/**" | ||
] | ||
} | ||
} | ||
] | ||
} |
Oops, something went wrong.