While working in my code, I decided to use 'firebase' instead of '@angular/fire'. However, I encountered an issue that displayed the following error message:
No suitable injection token for parameter 'functions' of class 'TodosComponent'
.
The problematic section lies within todos.component.ts
import { Component, OnDestroy, OnInit } from '@angular/core';
import { TodosService } from '../todos.service';
import { Todo } from './Todo';
import * as functions from 'firebase/functions';
declare var StripeCheckout: StripeCheckoutStatic;
@Component({
selector: 'app-todos',
templateUrl: './todos.component.html',
styleUrls: ['./todos.component.scss']
})
export class TodosComponent implements OnInit, OnDestroy {
todos!: Todo[];
localItem: string | null;
completedTodos: number = 0;
date: string = new Date().toUTCString();
constructor(private functions: functions.Functions) {
..........
}
......
}
I am struggling with the line of code
private functions: functions.Functions
.