[英]I tried to make a settings page but when i click on settings button to navigate to that page ,the following above error is appearing on console
Uncaught (in promise): NullInjectorError: StaticInjectorError(AppModule)[InjectionToken ToastConfig]:
StaticInjectorError(Platform: core)[InjectionToken ToastConfig]:
NullInjectorError: No provider for InjectionToken ToastConfig!
NullInjectorError: StaticInjectorError(AppModule)[InjectionToken ToastConfig]:
StaticInjectorError(Platform: core)[InjectionToken ToastConfig]:
NullInjectorError: No provider for InjectionToken ToastConfig!
at NullInjector.get (core.js:778)
at resolveToken (core.js:2564)
at tryResolveToken (core.js:2490)
at StaticInjector.get (core.js:2353)
at resolveToken (core.js:2564)
at tryResolveToken (core.js:2490)
at StaticInjector.get (core.js:2353)
at resolveNgModuleDep (core.js:26403)
at NgModuleRef_.get (core.js:27491)
at injectInjectorOnly (core.js:657)
at resolvePromise (zone-evergreen.js:797)
at resolvePromise (zone-evergreen.js:754)
at zone-evergreen.js:858
at ZoneDelegate.invokeTask (zone-evergreen.js:391)
at Object.onInvokeTask (core.js:34182)
at ZoneDelegate.invokeTask (zone-evergreen.js:390)
at Zone.runTask (zone-evergreen.js:168)
at drainMicroTaskQueue (zone-evergreen.js:559)
at ZoneTask.invokeTask [as invoke] (zone-evergreen.js:469)
at invokeTask (zone-evergreen.js:1603)
I tried to make a settings page but when I click on settings button to navigate to that page, the following above error is appearing on console.我试图创建一个设置页面,但是当我单击设置按钮导航到该页面时,控制台上出现以下上述错误。 Can anyone please help me to resolve this issue.谁能帮我解决这个问题。
Your error is linked to the NgxToastr lib, the config is missing.您的错误链接到 NgxToastr 库,缺少配置。 Did you import the module in your app.module.ts?您是否在 app.module.ts 中导入了模块?
@NgModule({
imports: [
ToastrModule.forRoot() // ToastrModule added
] ...
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.