Monday 25 October 2021

Unknown Syntax Error when implementing Cloud Functions in the new AngularFire 7 (Firebase 9)

In app.module.ts

import { provideFunctions, getFunctions } from '@angular/fire/functions';

@NgModule({
  imports: [
    ...
    provideFirebaseApp(() => initializeApp(environment.firebase)),
    provideFunctions(() => getFunctions()),
  ],

In my app.component

export class AppComponent {
  constructor(private fns: Functions) {}

  hello() {
    httpsCallable(
      this.fns,
      'test'
    )('hello world').then(() => console.log('complete'));
  }
}

enter image description here

This code works perfectly fine but why do I get this syntax error



from Unknown Syntax Error when implementing Cloud Functions in the new AngularFire 7 (Firebase 9)

No comments:

Post a Comment