Skip to content

An error occurs when "import" on v2.0.0 #149

Open
@pouu69

Description

Describe the bug

  • If you use version 2.0.0 after installing, an import error occurs.

To Reproduce
N/A

Expected behavior
It must be able to import JsonEditorComponent.

Console and Error stack trace

ERROR TypeError: (jsoneditor__WEBPACK_IMPORTED_MODULE_0___namespace_cache || jsoneditor__WEBPACK_IMPORTED_MODULE_0___namespace_cache) is not a constructor
image
// module.js
@NgModule({
 import: [
  // ...
  NgJsonEditorModule
  // ...
  ]
})

// component.js

import { JsonEditorComponent, JsonEditorOptions } from 'ang-jsoneditor';

export class EditorComponent implements OnInit, OnDestroy{
  // ...
   @ViewChild(JsonEditorComponent, { static: false }) editor: JsonEditorComponent;
   editorOptions = new JsonEditorOptions();
   editorData: any;
  // ...
}
<json-editor [debug]="false" [options]="editorOptions" [(ngModel)]="editorData"></json-editor>

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: MacOS
  • Browser : Chrome
  • Ng Version: 14.1.11
  • Angular Version: "~13.3.11"

Additional context

I think, can't load below module.
image

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions