daily pastebin goal
37%
SHARE
TWEET

Untitled

a guest Jan 18th, 2019 48 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import { Component } from "@angular/core";
  2. import { AngularFirestore } from "angularfire2/firestore";
  3. import { AngularFireAuth } from "@angular/fire/auth";
  4.  
  5. @Component({
  6.   selector: "app-root",
  7.   templateUrl: "./app.component.html",
  8.   styleUrls: ["./app.component.css"]
  9. })
  10. export class AppComponent {
  11.   db: any;
  12.   constructor(public afs: AngularFirestore, public afAuth: AngularFireAuth) {
  13.     this.getSettings();
  14.   }
  15.   async getSettings() {
  16.     var docRef = this.db.collection("mas-settings").doc("default");
  17.  
  18.     await docRef.get().then(doc => {
  19.       localStorage.setItem("appAdmin", JSON.stringify(doc.data().appAdministrator));
  20.       localStorage.setItem("authorizeDomain", JSON.stringify(doc.data().appAdministrator));
  21.       localStorage.setItem("contactAdmin", JSON.stringify(doc.data().appAdministrator));
  22.       localStorage.setItem("contactGroup", JSON.stringify(doc.data().appAdministrator));
  23.     });
  24.   }
  25. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top