En app.module.ts
import { provideFunctions, getFunctions } from '@angular/fire/functions'; @NgModule({ imports: [ ... provideFirebaseApp(() => initializeApp(environment.firebase)), provideFunctions(() => getFunctions()), ],En mi aplicación.componente
export class AppComponent { constructor(private fns: Functions) {} hello() { httpsCallable( this.fns, 'test' )('hello world').then(() => console.log('complete')); } }Este código funciona perfectamente bien, pero ¿por qué recibo este error de sintaxis?
No estoy seguro, pero ¿no debería ser así?
import { AngularFireFunctions as Functions } from '@angular/fire/compat/functions';¿en cambio?
Basado en documentos de funciones .
Entonces, podría usarse como this.fns.httpsCallable('test') .