import { Component , OnInit } from '@angular/core' ; import { AngularFireFunctions } from '@angular/fire/compat/functions' ; import { EMPTY , Observable } from 'rxjs' ; @ Component ( { selector : 'app-functions' , template : `
    <p>
      Functions!
      {{ response$ | async | json }}
      <button (click)="request()">Call!</button>
    </p>
  ` , styles : [ ] } ) export class FunctionsComponent implements OnInit { response$ : Observable < any > ; constructor ( public readonly functions ) { this . response$ = EMPTY ; } ngOnInit ( ) { } request ( ) { this . response$ = this . functions . httpsCallable ( 'yada' , { timeout : 3000 } ) ( { } ) ; } }