core.js:4002 ERROR Error: 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]:
StaticInjectorError(Platform: core)[InjectionToken ToastConfig]:
NullInjectorError: No provider for InjectionToken ToastConfig!
NullInjectorError: StaticInjectorError(AppModule)[InjectionToken ToastConfig]:
StaticInjectorError(Platform: core)[InjectionToken ToastConfig]:
Once I import it in the App Module:
import { ToastrModule } from 'ngx-toastr';
ToastrModule.forRoot({
timeOut: 5000,
positionClass: 'toast-bottom-center',
preventDuplicates: true,
closeButton: true,
progressBar: true,
maxOpened: 1,
autoDismiss: true,
enableHtml: true
}),
0 comments:
Post a Comment
Note: only a member of this blog may post a comment.