Open
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
// 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
Metadata
Assignees
Labels
No labels