Skip to content

Instantly share code, notes, and snippets.

View delitamakanda's full-sized avatar
:electron:
learning

Délita Makanda delitamakanda

:electron:
learning
View GitHub Profile
@jefBinomed
jefBinomed / PWA-console-snippets.js
Last active January 25, 2023 12:53
PWA Console Helpers
// Copy and paste the one you need
// Check current registration
navigator.serviceWorker.getRegistration()
.then(registration => console.log('Registration : ', registration));
// Cancel current registation
navigator.serviceWorker.getRegistration()
.then(async (registration)=>{
if (!registration){
import {ActionReducer, Action} from '@ngrx/store';
import {merge, pick} from 'lodash-es';
function setSavedState(state: any, localStorageKey: string) {
localStorage.setItem(localStorageKey, JSON.stringify(state));
}
function getSavedState(localStorageKey: string): any {
return JSON.parse(localStorage.getItem(localStorageKey));
}
@jsdevtom
jsdevtom / app-routing.animation.ts
Last active December 23, 2022 17:09
Fade out angular 2 loading page/ Fade in first angular 2 component
import {
trigger,
state,
style,
animate,
transition
} from '@angular/animations';
import { AnimationEntryMetadata } from "@angular/core";