在升级我的nodejs(以前是8,现在是12)和Angular(以前是7,现在是10)之前,我使用的是ang-jsoneditor。升级后,ang-jsoneditor 似乎不起作用,错误是
\ncore.js:4442 ERROR TypeError: Cannot read property \'nativeElement\' of undefined\n at JsonEditorComponent.ngOnInit (ang-jsoneditor.js:50)\n at callHook (core.js:3281)\n at callHooks (core.js:3251)\n at executeInitAndCheckHooks (core.js:3203)\n at selectIndexInternal (core.js:6324)\n at Module.\xc9\xb5\xc9\xb5advance (core.js:6306)\n at NewConfigurationEditorComponent_Template (new-configuration-editor.component.html:72)\n at executeTemplate (core.js:7511)\n at refreshView (core.js:7380)\n at refreshComponent (core.js:8527)\nRun Code Online (Sandbox Code Playgroud)\n我访问了主页https://github.com/mariohmol/ang-jsoneditor,它说只支持4到9的角度。这是我的package.json,请指教。
\n{\n "name": "configuration-service",\n "version": "0.0.0",\n "scripts": {\n "ng": "ng",\n "start": "ng serve",\n "build": "ng build --prod --aot --output-hashing all",\n "test": "ng test",\n "lint": "ng lint",\n "e2e": "ng e2e"\n },\n "private": true,\n "dependencies": {\n …Run Code Online (Sandbox Code Playgroud)