Skip to content

Commit 188920f

Browse files
committed
feat(pwa): ng add @angular/pwa --project universal-demo
1 parent 9cd0e47 commit 188920f

18 files changed

+168
-278
lines changed

README-RO.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
- [x] folosim **[ngx-meta](https://github.com/fulls1z3/ngx-meta)** pentru SEO (*title, meta tags, and Open Graph tags for social sharing*).
2626
- [x] folosim ngx-translate pentru i18n
2727
- [x] folosim ORIGIN_URL - pentru drumuri absolute
28-
- [ ] @angular/service-worker
28+
- [x] @angular/service-worker(`ng add @angular/pwa --project universal-demo`)
2929
- [ ] Ionic - e nevoie să creăm versiunea web, până când avem probleme [branch aparte](https://github.com/Angular-RU/angular-universal-starter/tree/ionic)
3030

3131
## Cum să pornim?

README-RU.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
- [x] Uses **[ngx-meta](https://github.com/fulls1z3/ngx-meta)** для SEO (*title, meta tags, and Open Graph tags for social sharing*).
2626
- [x] используется ngx-translate для поддержки интернационализации (i18n)
2727
- [x] используется ORIGIN_URL - для абсолютных запросов
28-
- [ ] @angular/service-worker
28+
- [x] @angular/service-worker(`ng add @angular/pwa --project universal-demo`)
2929
- [ ] Ionic - необходимо собрать веб версию, пока есть проблемы [отдельная ветка](https://github.com/Angular-RU/angular-universal-starter/tree/ionic)
3030

3131
## Как запустить

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
- [x] Uses **[ngx-meta](https://github.com/fulls1z3/ngx-meta)** for SEO (*title, meta tags, and Open Graph tags for social sharing*).
2626
- [x] uses ngx-translate to support internationalization (i18n)
2727
- [x] uses ORIGIN_URL - for absolute queries
28-
- [ ] @angular/service-worker
28+
- [x] @angular/service-worker(`ng add @angular/pwa --project universal-demo`)
2929
- [ ] Ionic - it is necessary to compile the web version while there are problems [separate branch](https://github.com/Angular-RU/angular-universal-starter/tree/ionic)
3030

3131
## How to start

angular.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@
1919
"assets": [
2020
"src/assets",
2121
"src/favicon.ico",
22-
"src/robots.txt"
22+
"src/robots.txt",
23+
"src/manifest.json"
2324
],
2425
"styles": [
2526
"src/styles.scss",
@@ -51,7 +52,8 @@
5152
"replace": "src/environments/environment.ts",
5253
"with": "src/environments/browser/environment.prod.ts"
5354
}
54-
]
55+
],
56+
"serviceWorker": true
5557
}
5658
}
5759
},
@@ -90,7 +92,8 @@
9092
"assets": [
9193
"src/assets",
9294
"src/favicon.ico",
93-
"src/robots.txt"
95+
"src/robots.txt",
96+
"src/manifest.json"
9497
]
9598
}
9699
},

ngsw-config.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"index": "/index.html",
3+
"assetGroups": [{
4+
"name": "app",
5+
"installMode": "prefetch",
6+
"resources": {
7+
"files": [
8+
"/favicon.ico",
9+
"/index.html",
10+
"/*.css",
11+
"/*.js"
12+
]
13+
}
14+
}, {
15+
"name": "assets",
16+
"installMode": "lazy",
17+
"updateMode": "prefetch",
18+
"resources": {
19+
"files": [
20+
"/assets/**"
21+
]
22+
}
23+
}]
24+
}

0 commit comments

Comments
 (0)