Skip to content

Instantly share code, notes, and snippets.

View synga's full-sized avatar
🏠
Working from home

Gabriel Barreto synga

🏠
Working from home
View GitHub Profile
@synga
synga / products.service.ts
Created January 25, 2020 21:27
Firebase Offline Exemplo
import { Injectable } from '@angular/core';
import { Product } from '../interfaces/product';
// aqui você substitui pelo angularFire que ta utilizando
import * as firebase from 'firebase';
// import do localStorage do angular, tem que instalar essa lib https://www.npmjs.com/package/@ngx-pwa/local-storage
import { StorageMap } from '@ngx-pwa/local-storage';
@Injectable({
providedIn: 'root'
})