@ Анил, спасибо за ответ, я использую этот учебник, чтобы показать мне, что это мой ngsw-config.json
{
"$schema": "./node_modules/@angular/service-worker/config/schema.json",
"index": "/index.html",
"assetGroups": [
{
"name": "app",
"installMode": "prefetch",
"resources": {
"files": [
"/favicon.ico",
"/index.html",
"/*.css",
"/*.js",
"/assets/*"
]
}
},
{
"name": "assets",
"installMode": "lazy",
"updateMode": "prefetch",
"resources": {
"files": [
"/assets/**",
"/*.(eot|svg|cur|jpg|png|webp|gif|otf|ttf|woff|woff2|ani)"
]
}
}
],
"dataGroups": [
{
"name": "api-freshness",
"urls": [
"/Notification"
],
"cacheConfig": {
"maxSize": 100,
"maxAge": "3d",
"timeout": "1m",
"strategy": "freshness"
}
}
]
}
, если при отправке пустого сообщения возвращается еще одна ошибка, я не знаю, если анализполезная нагрузка -
1005 *
let payLoad = {
"notification": {
"title": "The push notification title",
"actions": [
{
"action": "actionOne",
"title": "Action One"
}
],
"body": "The is the body which will be shown on notification",
"dir": "auto",
"icon": "path to icon",
"badge": "path to badge",
"lang": "en",
"renotify": true,
"requireInteraction": true,
"tag": 926796012340920300,
"vibrate": [300, 100, 400],
"data": {
// this object can contain arbitrary info
}
}
}