File

src/app/services/overall/overall.service.ts

Index

Properties

Constructor

constructor(afs: AngularFirestore)
Parameters :
Name Type Optional
afs AngularFirestore No

Properties

getNoticeTopics
Default value : () => {...}

Return an Observable of topics Method will query firebase documents created by the Library Admin and query for the notice topics

import { Injectable } from '@angular/core';
import { AngularFirestore } from '@angular/fire/firestore';
import { Topic } from 'src/app/models/Topic';

@Injectable({
  providedIn: 'root'
})
export class OverallService {
  constructor(private afs: AngularFirestore) {}

  /**
   * Return an Observable of topics
   * Method will query firebase documents created by the Library Admin and query for the notice topics
   */
  getNoticeTopics = () => {
    return this.afs
      .collection('admin')
      .doc('notices')
      .collection<Topic>('topics')
      .valueChanges();
  };
}

result-matching ""

    No results matching ""