froala / angular-froala-wysiwyg

Angular 4, 5, 6, 7, 8 and 9 plugin for Froala WYSIWYG HTML Rich Text Editor.
https://froala.com/wysiwyg-editor
736 stars 202 forks source link

Angular 8 w/Ivy build: ERROR in Value at position 0 in the NgModule.importss of FERootModule is not a reference: [object Object] #304

Open clintconklin opened 5 years ago

clintconklin commented 5 years ago

When trying to build an angular project with enableIvy enabled and angular-froala-wysiwyg 3.0.0-rc.1 I get the following error:

ERROR in Value at position 0 in the NgModule.importss of FERootModule is not a reference: [object Object]

ng --version:

Angular CLI: 8.0.0
Node: 10.15.3
OS: darwin x64
Angular: 8.0.0
... animations, cdk, cli, common, compiler, compiler-cli, core
... forms, language-service, material, material-moment-adapter
... platform-browser, platform-browser-dynamic, router
... service-worker

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.800.0
@angular-devkit/build-angular     0.800.0
@angular-devkit/build-optimizer   0.800.0
@angular-devkit/build-webpack     0.800.0
@angular-devkit/core              8.0.0
@angular-devkit/schematics        8.0.0
@angular/pwa                      0.6.8
@ngtools/webpack                  8.0.0
@schematics/angular               8.0.0
@schematics/update                0.800.0
rxjs                              6.5.2
typescript                        3.4.5
webpack                           4.30.0

I've tried with node 12.2.0 as well, but same issue.

Any ideas?

sfabriece commented 5 years ago

is this still a problem CLI version 8.0.3 @clintconklin ?

clintconklin commented 5 years ago

@sfabriece just tried with angular cli 8.0.3 and angular-froala-wysiwyg 3.0.1 and unfortunately it is.

sfabriece commented 5 years ago

I see, this might have something to do with https://github.com/angular/angular/issues/31032 @clintconklin

ahmadalibaloch commented 4 years ago

Still getting this problem, with latest Angular 9.1.0, created new Project today.

lenichols commented 4 years ago

@ahmadalibaloch same... were you able to get it working?

ahmadalibaloch commented 4 years ago

@lenichols No, I couldn't use forRoot for a module configuration input. Simply used provider with config.

const SCREEN_CONFIG = { mobile: [0, 600], tablet: [600, 800], desktop: [800, 1600] };
@NgModule({
  declarations: [AppComponent],
  imports: [
    BrowserModule,
    AppRoutingModule,
    UIUtilsModule,
  ],
  providers: [
    [{ provide: 'windowObject', useValue: window },
    { provide: 'config', useValue: SCREEN_CONFIG }],
    ScreenDetectorService
  ],
  bootstrap: [AppComponent]
})
export class AppModule { }