Skip to content

Instantly share code, notes, and snippets.

@tolutronics
tolutronics / app.component.ts
Last active Feb 14, 2022
Receiving update from code push server, handling the process
View app.component.ts
import { SyncStatus } from 'capacitor-codepush/dist/esm/syncStatus';
import { codePush, InstallMode } from 'capacitor-codepush';
import { Component } from '@angular/core';
import { Platform } from '@ionic/angular';
import { SplashScreen } from '@capacitor/splash-screen';
import { App } from '@capacitor/app';
import {
IRemotePackage,
ILocalPackage,
} from 'capacitor-codepush/dist/esm/package';
View onboarding.page.html
<ion-content color="primary" >
<div class="overlay" id="overlay">
<ng-container *ngIf="pos===1">
<h1 style="color: #fff;">Energy</h1>
<p>Lorem ipsum, dolor sit amet consectetur adipisicing elit. Aspernatur ad ex illum provident natus beatae nemo quidem aut qui ipsam.</p>
</ng-container>
<ng-container *ngIf="pos===2">
@tolutronics
tolutronics / app.component.ts
Created Sep 16, 2021
Receiving update from codepush
View app.component.ts
import { SyncStatus } from 'capacitor-codepush/dist/esm/syncStatus';
import { codePush, InstallMode } from 'capacitor-codepush';
import { Component } from '@angular/core';
import { Platform } from '@ionic/angular';
import { SplashScreen } from '@capacitor/splash-screen';
import { App } from '@capacitor/app';
@Component({
selector: "app-root",
templateUrl: "app.component.html",