尽管这是我第一次在Angular项目中使用PWA,但我正在使用Angular和PWA构建音乐网络应用程序。但是我面临的问题是,当我单击Chrome中的离线模式时,我的应用程序无法正常工作。当我离线时,浏览器始终显示“无互联网连接”。请问我该怎么办? 我网站的提单页面是https://naipod.com/home/music,下面是我的manifest.json内容和ngsw-config.json。
### manifest.json ###
{
"name": "naipod",
"short_name": "naipod",
"theme_color": "#F96816",
"background_color": "#fafafa",
"display": "standalone",
"scope": "/",
"start_url": "/",
"icons": [
{
"src": "assets/icons/icon-72x72.png",
"sizes": "72x72",
"type": "image/png"
},
{
"src": "assets/icons/icon-96x96.png",
"sizes": "96x96",
"type": "image/png"
},
{
"src": "assets/icons/icon-128x128.png",
"sizes": "128x128",
"type": "image/png"
},
{
"src": "assets/icons/icon-144x144.png",
"sizes": "144x144",
"type": "image/png"
},
{
"src": "assets/icons/icon-152x152.png",
"sizes": "152x152",
"type": "image/png"
},
{
"src": "assets/icons/icon-192x192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "assets/icons/icon-384x384.png",
"sizes": "384x384",
"type": "image/png"
},
{
"src": "assets/icons/icon-512x512.png",
"sizes": "512x512",
"type": "image/png"
}
]
}
{
"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/**",
"/*.(eot|svg|cur|jpg|png|webp|gif|otf|ttf|woff|woff2|ani)"
]
}
}
],
"dataGroups": [{
"name": "naipodapi",
"urls": [
"https://naipod.com/naipodapi/getsongs"
],
"cacheConfig": {
"strategy" : "performance",
"maxAge" : "1d",
"maxSize" : 100
}
}
]
}
我在做什么错了。