KillerCodeMonkey / ngx-quill

Angular (>=2) components for the Quill Rich Text Editor
MIT License
1.78k stars 260 forks source link

Weird Error: ' NullInjectorError: No provider for config!' #305

Closed EventectiveNButler closed 5 years ago

EventectiveNButler commented 5 years ago

I have been using quill editor in my projects for almost a year, just went from angular 4.3.5 using ngx-quill 1.6 to angular 7.1.3 and ngx-quill 4.4.2 with quill 1.3.6 and now I am getting the below. I thought it was my dropzone wrapper for a while, I decided to start commenting out different html sections of my component until I found the culprit.

                                <div class="m-b-md" *ngIf="true">
                                    <quill-editor (onEditorCreated)="applyAccessibilityHacks($event)" [modules]="toolBarConfig" [(ngModel)]="currItem.BasicItemDescription" id="storydescription" name="storydescription" [maxlength]="2000"></quill-editor>
                                </div>

When *ngIf is set to true above the below error is thrown, when false, no error is thrown on the page.

ERROR Error: StaticInjectorError(AppModule)[config]: 
  StaticInjectorError(Platform: core)[config]: 
    NullInjectorError: No provider for config!

I was not sure about the line "for builds with angular-cli >=6 only add quilljs to your scripts!" so I commented out ngx-quill, I have tried both ways and neither works, same error.

(function (global) {
    System.config({
        transpiler: 'traceur',
        paths: {
            // paths serve as alias
            'npm:': '../../Areas/node_modules/',
            'app:': '../../Areas/MyEventWebsite/App/'
        },
        // map tells the System loader where to look for things
        map: {
            // our app is within the app folder
            app: '../App',
            // angular bundles
            '@angular/animations': 'npm:@angular/animations/bundles/animations.umd.js',
            '@angular/animations/browser': 'npm:@angular/animations/bundles/animations-browser.umd.js',
            '@angular/core': 'npm:@angular/core/bundles/core.umd.min.js',
            '@angular/common': 'npm:@angular/common/bundles/common.umd.min.js',
            '@angular/common/http': 'npm:@angular/common/bundles/common-http.umd.min.js',
            'tslib': 'npm:tslib/tslib.js',
            '@angular/compiler': 'npm:@angular/compiler/bundles/compiler.umd.min.js',
            '@angular/platform-browser': 'npm:@angular/platform-browser/bundles/platform-browser.umd.min.js',
            '@angular/platform-browser/animations': 'npm:@angular/platform-browser/bundles/platform-browser-animations.umd.js',
            '@angular/platform-browser-dynamic': 'npm:@angular/platform-browser-dynamic/bundles/platform-browser-dynamic.umd.min.js',
            '@angular/http': 'npm:@angular/http/bundles/http.umd.min.js',
            '@angular/router': 'npm:@angular/router/bundles/router.umd.min.js',
            '@angular/forms': 'npm:@angular/forms/bundles/forms.umd.min.js',
            // other libraries
            'rxjs': 'npm:rxjs',
            'traceur': 'npm:traceur/src',
            'ng2-dnd': 'npm:ng2-dnd/bundles/index.umd.js',
            'ngx-dropzone-wrapper': 'npm:ngx-dropzone-wrapper/bundles/ngx-dropzone-wrapper.umd.js',
            'croppie': 'npm:croppie/croppie.js',
            'ng2-validation': 'npm:ng2-validation/bundles/ng2-validation.umd.js',
            'libphonenumber-js': 'npm:libphonenumber-js/bundle/libphonenumber-js.min.js', //Required for ng2-validation...why... no idea
            'ng2-dragula': 'npm:ng2-dragula/bundles/ng2-dragula.umd.js',
            'ngx-cookie': 'npm:ngx-cookie/bundles/ngx-cookie.umd.js',
            'angular2-datetimepicker': 'npm:angular2-datetimepicker/index.umd.min.js',
            'nouislider': 'npm:nouislider',
            'ng2-nouislider': 'npm:ng2-nouislider',
            'ngx-color-picker': 'npm:ngx-color-picker/bundles/ngx-color-picker.umd.min.js',
            //'ngx-tags-input': 'npm:ngx-tags-input',
            'ngx-bootstrap/typeahead': 'npm:ngx-bootstrap',
            //'ngx-quill': 'npm:ngx-quill/bundles/ngx-quill.umd.js',
            'quill': 'npm:quill/dist/quill.js'
        },
        // packages tells the System loader how to load when no filename and/or no extension
        packages: {
            '.': {
                defaultJSExtensions: 'js'
            },
            app: {
                main: './main.js',
                defaultExtension: 'js'
            },
            rxjs: {
                defaultExtension: 'js'
            },
            traceur: {
                main: 'traceur'
            },
            'nouislider': {
                main: 'distribute/nouislider.js',
                defaultExtension: 'js'
            },
            'ng2-nouislider': {
                main: 'src/nouislider.js',
                defaultExtension: 'js'
            },
            'ngx-bootstrap/typeahead':
                {
                    format: 'cjs',
                    main: 'bundles/ngx-bootstrap.umd.js',
                    defaultExtension: 'js'
                },/*
            'ngx-quill': {
                format: 'cjs',
                meta: {
                    deps: ['quill']
                }
            },*/
            'quill': {
                format: 'cjs'
            }
        },
        defaultJSExtensions: true
    });
})(this);
  "dependencies": {
    "@angular/animations": "7.1.3",
    "@angular/cdk": "^7.1.1",
    "@angular/common": "7.1.3",
    "@angular/compiler": "7.1.3",
    "@angular/compiler-cli": "7.1.3",
    "@angular/core": "7.1.3",
    "@angular/flex-layout": "^7.0.0-beta.19",
    "@angular/forms": "7.1.3",
    "@angular/http": "7.1.3",
    "@angular/material": "^7.1.1",
    "@angular/platform-browser": "7.1.3",
    "@angular/platform-browser-dynamic": "7.1.3",
    "@angular/platform-server": "7.1.3",
    "@angular/router": "7.1.3",
    "@angular/upgrade": "7.1.3",
    "@types/jquery": "^2.0.51",
    "angular2-datetimepicker": "^1.1.1",
    "bootstrap": "^3.3.7",
    "core-js": "^2.6.0",
    "croppie": "^2.6.2",
    "jquery": "^3.3.1",
    "ng2-dnd": "^4.2.0",
    "ng2-dragula": "^1.5.0",
    "ng2-nouislider": "^1.7.13",
    "ng2-validation": "^4.2.0",
    "ngx-color-picker": "^4.5.3",
    "ngx-cookie": "^1.0.1",
    "ngx-dropzone-wrapper": "^7.1.0",
    "ngx-quill": "^4.4.2",
    "nouislider": "^11.1.0",
    "quill": "^1.3.6",
    "reflect-metadata": "^0.1.12",
    "rxjs": "^6.3.3",
    "save": "^2.3.3",
    "systemjs": "0.19.39",
    "traceur": "0.0.111",
    "tslib": "^1.9.0",
    "typescript": "3.1.6",
    "zone.js": "^0.8.26"
  }

Thoughts or suggestions?

Thanks!

KillerCodeMonkey commented 5 years ago

Because You are Using systemjs and Not angular-cli?

Am Mi., 19. Dez. 2018, 16:24 hat EventectiveNButler < notifications@github.com> geschrieben:

I have been using quill editor in my projects for almost a year, just went from angular 4.3.5 using ngx-quill 1.6 to angular 7.1.3 and ngx-quill 4.4.2 with quill 1.3.6 and now I am getting the below. I thought it was my dropzone wrapper for a while, I decided to start commenting out different html sections of my component until I found the culprit.

                        <div class="m-b-md" *ngIf="true">
                            <quill-editor (onEditorCreated)="applyAccessibilityHacks($event)" [modules]="toolBarConfig" [(ngModel)]="currItem.BasicItemDescription" id="storydescription" name="storydescription" [maxlength]="2000"></quill-editor>
                        </div>

Qhen *ngIf is set to true above the below error is thrown, when false, no error is thrown on the page. ERROR Error: StaticInjectorError(AppModule)[config]: StaticInjectorError(Platform: core)[config]: NullInjectorError: No provider for config!

I was not sure about the line "for builds with angular-cli >=6 only add quilljs to your scripts!" so I commented out ngx-quill, I have tried both ways and neither works, same error. (function (global) { System.config({ transpiler: 'traceur', paths: { // paths serve as alias 'npm:': '../../Areas/node_modules/', 'app:': '../../Areas/MyEventWebsite/App/' }, // map tells the System loader where to look for things map: { // our app is within the app folder app: '../App', // angular bundles '@angular/animations': 'npm:@angular /animations/bundles/animations.umd.js', '@angular/animations/browser': 'npm:@angular /animations/bundles/animations-browser.umd.js', '@angular/core': 'npm:@angular/core/bundles/core.umd.min.js', '@angular/common': 'npm:@angular/common/bundles/common.umd.min.js', '@angular/common/http': 'npm:@angular /common/bundles/common-http.umd.min.js', 'tslib': 'npm:tslib/tslib.js', '@angular/compiler': 'npm:@angular/compiler/bundles/compiler.umd.min.js', '@angular/platform-browser': 'npm:@angular /platform-browser/bundles/platform-browser.umd.min.js', '@angular/platform-browser/animations': 'npm:@angular /platform-browser/bundles/platform-browser-animations.umd.js', '@angular/platform-browser-dynamic': 'npm:@angular /platform-browser-dynamic/bundles/platform-browser-dynamic.umd.min.js', '@angular/http': 'npm:@angular/http/bundles/http.umd.min.js', '@angular/router': 'npm:@angular/router/bundles/router.umd.min.js', '@angular/forms': 'npm:@angular/forms/bundles/forms.umd.min.js', // other libraries 'rxjs': 'npm:rxjs', 'traceur': 'npm:traceur/src', 'ng2-dnd': 'npm:ng2-dnd/bundles/index.umd.js', 'ngx-dropzone-wrapper': 'npm:ngx-dropzone-wrapper/bundles/ngx-dropzone-wrapper.umd.js', 'croppie': 'npm:croppie/croppie.js', 'ng2-validation': 'npm:ng2-validation/bundles/ng2-validation.umd.js', 'libphonenumber-js': 'npm:libphonenumber-js/bundle/libphonenumber-js.min.js', //Required for ng2-validation...why... no idea 'ng2-dragula': 'npm:ng2-dragula/bundles/ng2-dragula.umd.js', 'ngx-cookie': 'npm:ngx-cookie/bundles/ngx-cookie.umd.js', 'angular2-datetimepicker': 'npm:angular2-datetimepicker/index.umd.min.js', 'nouislider': 'npm:nouislider', 'ng2-nouislider': 'npm:ng2-nouislider', 'ngx-color-picker': 'npm:ngx-color-picker/bundles/ngx-color-picker.umd.min.js', //'ngx-tags-input': 'npm:ngx-tags-input', 'ngx-bootstrap/typeahead': 'npm:ngx-bootstrap', //'ngx-quill': 'npm:ngx-quill/bundles/ngx-quill.umd.js', 'quill': 'npm:quill/dist/quill.js' }, // packages tells the System loader how to load when no filename and/or no extension packages: { '.': { defaultJSExtensions: 'js' }, app: { main: './main.js', defaultExtension: 'js' }, rxjs: { defaultExtension: 'js' }, traceur: { main: 'traceur' }, 'nouislider': { main: 'distribute/nouislider.js', defaultExtension: 'js' }, 'ng2-nouislider': { main: 'src/nouislider.js', defaultExtension: 'js' }, 'ngx-bootstrap/typeahead': { format: 'cjs', main: 'bundles/ngx-bootstrap.umd.js', defaultExtension: 'js' },/ 'ngx-quill': { format: 'cjs', meta: { deps: ['quill'] } },/ 'quill': { format: 'cjs' } }, defaultJSExtensions: true }); })(this);

"dependencies": { "@angular/animations": "7.1.3", "@angular/cdk": "^7.1.1", "@angular/common": "7.1.3", "@angular/compiler": "7.1.3", "@angular/compiler-cli": "7.1.3", "@angular/core": "7.1.3", "@angular/flex-layout": "^7.0.0-beta.19", "@angular/forms": "7.1.3", "@angular/http": "7.1.3", "@angular/material": "^7.1.1", "@angular/platform-browser": "7.1.3", "@angular/platform-browser-dynamic": "7.1.3", "@angular/platform-server": "7.1.3", "@angular/router": "7.1.3", "@angular/upgrade": "7.1.3", "@types/jquery": "^2.0.51", "angular2-datetimepicker": "^1.1.1", "bootstrap": "^3.3.7", "core-js": "^2.6.0", "croppie": "^2.6.2", "jquery": "^3.3.1", "ng2-dnd": "^4.2.0", "ng2-dragula": "^1.5.0", "ng2-nouislider": "^1.7.13", "ng2-validation": "^4.2.0", "ngx-color-picker": "^4.5.3", "ngx-cookie": "^1.0.1", "ngx-dropzone-wrapper": "^7.1.0", "ngx-quill": "^4.4.2", "nouislider": "^11.1.0", "quill": "^1.3.6", "reflect-metadata": "^0.1.12", "rxjs": "^6.3.3", "save": "^2.3.3", "systemjs": "0.19.39", "traceur": "0.0.111", "tslib": "^1.9.0", "typescript": "3.1.6", "zone.js": "^0.8.26" }

Thoughts or suggestions?

Thanks!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/KillerCodeMonkey/ngx-quill/issues/305, or mute the thread https://github.com/notifications/unsubscribe-auth/ACKOYMLQAN41q04bVX1I5IYZv1PRRZPkks5u6loWgaJpZM4ZadTX .

KillerCodeMonkey commented 5 years ago

Btw. If You want to use angular cli or webpack build Just Checkout the Demo repos :)

Am Mi., 19. Dez. 2018, 16:26 hat Bengt Weiße bengtler@googlemail.com geschrieben:

Because You are Using systemjs and Not angular-cli?

Am Mi., 19. Dez. 2018, 16:24 hat EventectiveNButler < notifications@github.com> geschrieben:

I have been using quill editor in my projects for almost a year, just went from angular 4.3.5 using ngx-quill 1.6 to angular 7.1.3 and ngx-quill 4.4.2 with quill 1.3.6 and now I am getting the below. I thought it was my dropzone wrapper for a while, I decided to start commenting out different html sections of my component until I found the culprit.

                        <div class="m-b-md" *ngIf="true">
                            <quill-editor (onEditorCreated)="applyAccessibilityHacks($event)" [modules]="toolBarConfig" [(ngModel)]="currItem.BasicItemDescription" id="storydescription" name="storydescription" [maxlength]="2000"></quill-editor>
                        </div>

Qhen *ngIf is set to true above the below error is thrown, when false, no error is thrown on the page. ERROR Error: StaticInjectorError(AppModule)[config]: StaticInjectorError(Platform: core)[config]: NullInjectorError: No provider for config!

I was not sure about the line "for builds with angular-cli >=6 only add quilljs to your scripts!" so I commented out ngx-quill, I have tried both ways and neither works, same error. (function (global) { System.config({ transpiler: 'traceur', paths: { // paths serve as alias 'npm:': '../../Areas/node_modules/', 'app:': '../../Areas/MyEventWebsite/App/' }, // map tells the System loader where to look for things map: { // our app is within the app folder app: '../App', // angular bundles '@angular/animations': 'npm:@angular /animations/bundles/animations.umd.js', '@angular/animations/browser': 'npm:@angular /animations/bundles/animations-browser.umd.js', '@angular/core': 'npm:@angular/core/bundles/core.umd.min.js', '@angular/common': 'npm:@angular/common/bundles/common.umd.min.js', '@angular/common/http': 'npm:@angular /common/bundles/common-http.umd.min.js', 'tslib': 'npm:tslib/tslib.js', '@angular/compiler': 'npm:@angular/compiler/bundles/compiler.umd.min.js', '@angular/platform-browser': 'npm:@angular /platform-browser/bundles/platform-browser.umd.min.js', '@angular/platform-browser/animations': 'npm:@angular /platform-browser/bundles/platform-browser-animations.umd.js', '@angular/platform-browser-dynamic': 'npm:@angular /platform-browser-dynamic/bundles/platform-browser-dynamic.umd.min.js', '@angular/http': 'npm:@angular/http/bundles/http.umd.min.js', '@angular/router': 'npm:@angular/router/bundles/router.umd.min.js', '@angular/forms': 'npm:@angular/forms/bundles/forms.umd.min.js', // other libraries 'rxjs': 'npm:rxjs', 'traceur': 'npm:traceur/src', 'ng2-dnd': 'npm:ng2-dnd/bundles/index.umd.js', 'ngx-dropzone-wrapper': 'npm:ngx-dropzone-wrapper/bundles/ngx-dropzone-wrapper.umd.js', 'croppie': 'npm:croppie/croppie.js', 'ng2-validation': 'npm:ng2-validation/bundles/ng2-validation.umd.js', 'libphonenumber-js': 'npm:libphonenumber-js/bundle/libphonenumber-js.min.js', //Required for ng2-validation...why... no idea 'ng2-dragula': 'npm:ng2-dragula/bundles/ng2-dragula.umd.js', 'ngx-cookie': 'npm:ngx-cookie/bundles/ngx-cookie.umd.js', 'angular2-datetimepicker': 'npm:angular2-datetimepicker/index.umd.min.js', 'nouislider': 'npm:nouislider', 'ng2-nouislider': 'npm:ng2-nouislider', 'ngx-color-picker': 'npm:ngx-color-picker/bundles/ngx-color-picker.umd.min.js', //'ngx-tags-input': 'npm:ngx-tags-input', 'ngx-bootstrap/typeahead': 'npm:ngx-bootstrap', //'ngx-quill': 'npm:ngx-quill/bundles/ngx-quill.umd.js', 'quill': 'npm:quill/dist/quill.js' }, // packages tells the System loader how to load when no filename and/or no extension packages: { '.': { defaultJSExtensions: 'js' }, app: { main: './main.js', defaultExtension: 'js' }, rxjs: { defaultExtension: 'js' }, traceur: { main: 'traceur' }, 'nouislider': { main: 'distribute/nouislider.js', defaultExtension: 'js' }, 'ng2-nouislider': { main: 'src/nouislider.js', defaultExtension: 'js' }, 'ngx-bootstrap/typeahead': { format: 'cjs', main: 'bundles/ngx-bootstrap.umd.js', defaultExtension: 'js' },/ 'ngx-quill': { format: 'cjs', meta: { deps: ['quill'] } },/ 'quill': { format: 'cjs' } }, defaultJSExtensions: true }); })(this);

"dependencies": { "@angular/animations": "7.1.3", "@angular/cdk": "^7.1.1", "@angular/common": "7.1.3", "@angular/compiler": "7.1.3", "@angular/compiler-cli": "7.1.3", "@angular/core": "7.1.3", "@angular/flex-layout": "^7.0.0-beta.19", "@angular/forms": "7.1.3", "@angular/http": "7.1.3", "@angular/material": "^7.1.1", "@angular/platform-browser": "7.1.3", "@angular/platform-browser-dynamic": "7.1.3", "@angular/platform-server": "7.1.3", "@angular/router": "7.1.3", "@angular/upgrade": "7.1.3", "@types/jquery": "^2.0.51", "angular2-datetimepicker": "^1.1.1", "bootstrap": "^3.3.7", "core-js": "^2.6.0", "croppie": "^2.6.2", "jquery": "^3.3.1", "ng2-dnd": "^4.2.0", "ng2-dragula": "^1.5.0", "ng2-nouislider": "^1.7.13", "ng2-validation": "^4.2.0", "ngx-color-picker": "^4.5.3", "ngx-cookie": "^1.0.1", "ngx-dropzone-wrapper": "^7.1.0", "ngx-quill": "^4.4.2", "nouislider": "^11.1.0", "quill": "^1.3.6", "reflect-metadata": "^0.1.12", "rxjs": "^6.3.3", "save": "^2.3.3", "systemjs": "0.19.39", "traceur": "0.0.111", "tslib": "^1.9.0", "typescript": "3.1.6", "zone.js": "^0.8.26" }

Thoughts or suggestions?

Thanks!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/KillerCodeMonkey/ngx-quill/issues/305, or mute the thread https://github.com/notifications/unsubscribe-auth/ACKOYMLQAN41q04bVX1I5IYZv1PRRZPkks5u6loWgaJpZM4ZadTX .

EventectiveNButler commented 5 years ago

"devDependencies": { "@angular-devkit/build-angular": "~0.11.0", "@angular/cli": "7.1.2", "@types/core-js": "^0.9.46", "@types/node": "^8.10.38", "typescript": "3.1.6", "typings": "^1.4.0" }

KillerCodeMonkey commented 5 years ago

Yeah but so Not use angular cli only by installing the npm Module..

You should configure your Project with angular.json and build it with the "ng build" Command

Like i Said Just Checkout the cli Demo repo.

And the Missing config Provider IS Part of the ngx-quill Module. So Your angular Module needs to import the QuillModule as mentioned in the readme

Am Mi., 19. Dez. 2018, 16:29 hat EventectiveNButler < notifications@github.com> geschrieben:

"devDependencies": { "@angular-devkit/build-angular": "~0.11.0", "@angular/cli": "7.1.2", "@types/core-js": "^0.9.46", "@types/node": "^8.10.38", "typescript": "3.1.6", "typings": "^1.4.0" }

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/KillerCodeMonkey/ngx-quill/issues/305#issuecomment-448635819, or mute the thread https://github.com/notifications/unsubscribe-auth/ACKOYJqsqSdwG1r_C0cd-5EUN1uSNmgNks5u6lt1gaJpZM4ZadTX .

EventectiveNButler commented 5 years ago

Removed systemjs from package.json and rebuilt (using ng build) no change

KillerCodeMonkey commented 5 years ago

Just build an example repo or Stack Blitz or codepen where i can See Your Project structure and how You are Using ngxquill.

But Just Checkout my Demo repo.. IT IS Working with angular 7 and the latest ngx-quill ;)

Am Mi., 19. Dez. 2018, 16:36 hat EventectiveNButler < notifications@github.com> geschrieben:

Removed, systemjs from package.json and rebuilt no change

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/KillerCodeMonkey/ngx-quill/issues/305#issuecomment-448637999, or mute the thread https://github.com/notifications/unsubscribe-auth/ACKOYC2Ub5grvKjtsgbkqusR7kDKKztiks5u6lzhgaJpZM4ZadTX .

EventectiveNButler commented 5 years ago

Just build a example repo or Stack Blitz or codepen where i can See You Project structure and how You are Using ngxquill. But Just Checkout my Demo repo.. IT IS Working with angular 7 and the latest ngx-quill ;) Am Mi., 19. Dez. 2018, 16:36 hat EventectiveNButler < notifications@github.com> geschrieben: Removed, systemjs from package.json and rebuilt no change — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#305 (comment)>, or mute the thread https://github.com/notifications/unsubscribe-auth/ACKOYC2Ub5grvKjtsgbkqusR7kDKKztiks5u6lzhgaJpZM4ZadTX .

Not an option, would take a long a$$ time, this is a very large corporate project, just trying to move it from angular 4 to 7

KillerCodeMonkey commented 5 years ago

yeah but i will not solve your problem of migrating your project to angular 7 ;).

I can only help you with ngx-quill errors. And as i said, you can just see how ngx-quill works with angular 7.

Maybe you can share the code of your app.module ?

EventectiveNButler commented 5 years ago

A Module that uses quill: import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; import { FormsModule } from '@angular/forms';

import { ItemsEditComponent } from './itemsedit.component';

import { ItemsEditRoutingModule } from './itemsedit.routing.module';

import { CustomFormsModule } from 'ng2-validation'; import { DropzoneModule } from 'ngx-dropzone-wrapper';

import { DragulaModule } from 'ng2-dragula';

//import { TagsInputModule } from 'ngx-tags-input/dist/index'; import { QuillModule } from 'ngx-quill'

import { DatePickerModule } from '../../shared/MyDatePicker/shared.module';

import { SharedModule } from '../../Shared/shared.module';

@NgModule({ imports: [ ItemsEditRoutingModule, FormsModule, CustomFormsModule, CommonModule, DropzoneModule, DragulaModule, //TagsInputModule.forRoot(), DatePickerModule, QuillModule, SharedModule ], declarations: [ItemsEditComponent], bootstrap: [ItemsEditComponent] }) export class ItemsEditModule { }

KillerCodeMonkey commented 5 years ago

But your error comes from "AppModule" and not "ItemsEditModule"???

EventectiveNButler commented 5 years ago

AppModule is the Root of the entire app here it is: import { NgModule } from '@angular/core'; import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { AppComponent } from './app.component'; import { HttpClientModule, HttpClient } from '@angular/common/http';

import { SharedComponent } from './Shared/shared.component'; import { MyEventWebsiteService } from './myeventwebsite.service';

/ Routing Module / import { AppRoutingModule } from './app.routing.module';

import { CookieModule } from 'ngx-cookie';

@NgModule({ imports: [BrowserAnimationsModule, HttpClientModule, AppRoutingModule, CookieModule.forRoot()], declarations: [AppComponent, SharedComponent], bootstrap: [AppComponent], providers: [MyEventWebsiteService] }) export class AppModule { }

KillerCodeMonkey commented 5 years ago

Okay, Try to import quill module in that base module

The QuillModule Config is something like a global provider, so you can overwrite the config by calling

QuillModule.forRoot()
KillerCodeMonkey commented 5 years ago

aaaand...? :)

EventectiveNButler commented 5 years ago

Adding it to the root seemed to have fixed it THANKS! Also a note for others if they stumble on this when upgrading angular versions, you will need to leave the import in sub module as well as add it to the root module. When I removed it from 'ItemsEditModule' to try and clean up the code I got the error : 'Can't bind to 'modules' since it isn't a known property of 'quill-editor''

KillerCodeMonkey commented 5 years ago

Do you use lazy loading modules?

Than yes, you need to register the module in your root module. To make sure, that the config provider is registered at least in your root.

And all lazy loading modules need to import their deps

EventectiveNButler commented 5 years ago

Do you use lazy loading modules?

Than yes, you need to register the module in your root module. To make sure, that the config provider is registered at least in your root.

And all lazy loading modules need to import their deps

Yeah, seems to be a difference in how the modules are loaded v4 to v7, worked great in 4 only loading it in the child modules, seems to be working great in 7 now with the additional import into the root.

workingquill

KillerCodeMonkey commented 5 years ago

nope but ngx 4 has a config provider now, where you can configure your default toolbar.

And you have to make sure this provider is available at least in your root module ;)

tiennampham23 commented 4 years ago

This error occurs when i try to use ngx-quill in lazy load component.

In my lazy-load component, I declare no-export module to import another modules from core & third modules.

In LazyComponentModule: QuillModule.forRoot() I am using Angular 9.0, Ngx-Quill 8.1.3 and Quill 1.3.7.

Do you have an example about Ngx-quill used in Lazy load component in Angular 9

KillerCodeMonkey commented 4 years ago

Check the readme :)

QuillModule.forRoot()

Is only used in our AppModule In all child modules just use QuillModule in the module imports

tiennampham23 commented 4 years ago

@KillerCodeMonkey thank you

diaab9 commented 3 years ago

_****_