I updated all my node modules and when quill updated, all my editors broke in my application. The error "NullInjectorError: No provider for InjectionToken config!" appeared.
I Have fixed this problem! Just wanted to share with other ppl who might be in the same boat.
You need to add the QuillModule (import { QuillModule } from 'ngx-quill';) to the App Module 'Imports' section (or whatever module you are using). For me, I also needed to add .forRoot() to make it work
imports: [
QuillModule.forRoot(),
],
Again, this works for me, just letting you all know in case you encounter the same problem updating ngx-quill to the newest version
Angular runtime gives error-nullinjectorerror: no provider for httpclient! NullInjectorError: No provider for HttpClient! The issue is more due to not registering the required services i.e HttpClientModule in the root module ie. NgModule.
Angular runtime gives error-nullinjectorerror: no provider for httpclient! NullInjectorError: No provider for HttpClient! The issue is more due to not registering the required services i.e HttpClientModule in the root module ie.
For this I'm using an Injector, and loading the the service during ngOnInit. This works fine when using a string based provider, however my IDE notes that it's deprecated and I should use an InjectionTokenwhich I can't seem to wrap my head around.
This works fine when using a string based provider, however my IDE notes that it's deprecated and I should use an InjectionTokenwhich I can't seem to wrap my head around. I expected the following code to work, as removing all instances of InjectionTokenand replacing them with the direct string literal works:
First You have to import QUILL_CONFIG_TOKEN from 'ngx-quill' library after that you have to pass this class to inject eg QuillModule.forRoot(QUILL_CONFIG_TOKEN.ngInjectableDef)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With