I'm getting the following warning whenever I run my project:
Circular dependency detected: src/app/Dashboard/dashboard.module.ts -> src/app/Dashboard/finance.service.ts -> src/app/Dashboard/dashboard.module.ts
In my finances.service I have a function that creates an object of type "Statistics" which is a class that I defined on my dashboard.module
dashboard.module
export class Stadistics {
mod: number;
min: number;
max: number;
}
finance.service
getStatistics(array: Array<number>) {
const stats = new Statistics;
stats.max = 0;
stats.min = 0;
stats.mod = 0;
}
I also tried using: const stats: Statistics = new Statistics; but I keep getting the same warning. Any idea why this is happening?