import { EnvironmentProviders } from '@angular/core'; in toast.provider.ts gives Module…
- User
import { EnvironmentProviders } from '@angular/core'; in toast.provider.ts gives Module '"@angular/core"' has no exported member 'EnvironmentProviders'.ts(2305)
- Assistant
In the latest versions of Angular, there is no
EnvironmentProvidersexport in the@angular/coremodule. It seems like you might be looking forɵangular_packages_core_core_l, which is an internal Angular symbol that is used when creating custom providers.If you are trying to provide environment-specific configurations in your toast provider, you can do so by injecting the
environmentobject directly into your provider, like this:typescriptimport { Injectable, Inject } from '@angular/core'; import { environment } from '../environments/environment'; @Injectable({ providedIn: 'root' }) export class ToastProvider { constructor(@Inject('environment') private environment: any) { console.log('Environment:', this.environment); } // Your provider logic here }