AngularSwUpdate.activatednottriggered。
创始人
2024-10-29 17:00:42
0

可以尝试在应用程序启动时手动检查更新,以确保更新检查成功。以下是一些示例代码:

import { Component, OnInit } from '@angular/core'; import { SwUpdate } from '@angular/service-worker';

@Component({ selector: 'app-root', templateUrl: './app.component.html', styleUrls: ['./app.component.css'] }) export class AppComponent implements OnInit {

constructor(private swUpdate: SwUpdate) { }

ngOnInit() { if (this.swUpdate.isEnabled) { this.swUpdate.checkForUpdate().then(() => { console.log('App Checked for update'); }).catch((err) => { console.error(err); }); } } }

在这个例子中,我们在AppComponent的ngOnInit方法中手动检查更新。如果更新可用,则SwUpdate.activated应该被触发。

相关内容

热门资讯

开挂透视!pokemmo辅助官... 开挂透视!pokemmo辅助官网,xpoker透视辅助(透视)切实一直都是有辅助app(哔哩哔哩)1...
教你透视!pokemmo辅助器... 教你透视!pokemmo辅助器手机版下载,impoker辅助(透视)其实真的是有辅助app(哔哩哔哩...
关于透视!竞技联盟透视,uup... 关于透视!竞技联盟透视,uupoker透视(透视)果然是真的有辅助app(哔哩哔哩)1、玩家可以在竞...
了解透视!佛手在线大菠萝智能辅... 了解透视!佛手在线大菠萝智能辅助器,拱趴大菠萝辅助神器(透视)一贯存在有辅助方法(哔哩哔哩)1、完成...
必备透视!线上德州的辅助器是什... 必备透视!线上德州的辅助器是什么,epoker透视底牌(透视)原来一直总是有辅助攻略(哔哩哔哩)1、...
分享透视!红龙poker辅助,... 分享透视!红龙poker辅助,拱趴大菠萝挂(透视)一直是真的有辅助软件(哔哩哔哩)1、金币登录送、破...
必备透视!pokemmo内置修... 必备透视!pokemmo内置修改器,约局吧能不能开挂(透视)原来存在有辅助app(哔哩哔哩)1、首先...
关于透视!wepoker安装教... 关于透视!wepoker安装教程,哈糖大菠萝能开挂吗(透视)果然一直都是有辅助工具(哔哩哔哩)1、上...
解谜透视!poker mast... 解谜透视!poker master辅助,德州圈脚本(透视)竟然存在有辅助插件(哔哩哔哩)1、每一步都...
有挂透视!sohoo poke... 有挂透视!sohoo poker辅助器,德州透视是真的吗(透视)原来是真的有辅助插件(哔哩哔哩)1、...