Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import { Component } from "@angular/core";
- import { AngularFirestore } from "angularfire2/firestore";
- import { AngularFireAuth } from "@angular/fire/auth";
- @Component({
- selector: "app-root",
- templateUrl: "./app.component.html",
- styleUrls: ["./app.component.css"]
- })
- export class AppComponent {
- db: any;
- constructor(public afs: AngularFirestore, public afAuth: AngularFireAuth) {
- this.getSettings();
- }
- async getSettings() {
- var docRef = this.db.collection("mas-settings").doc("default");
- await docRef.get().then(doc => {
- localStorage.setItem("appAdmin", JSON.stringify(doc.data().appAdministrator));
- localStorage.setItem("authorizeDomain", JSON.stringify(doc.data().appAdministrator));
- localStorage.setItem("contactAdmin", JSON.stringify(doc.data().appAdministrator));
- localStorage.setItem("contactGroup", JSON.stringify(doc.data().appAdministrator));
- });
- }
- }
Add Comment
Please, Sign In to add comment