Angular 2+ Integration
See original GitHub issueHi json-editor team, I have an angular 5 project and I can`t figure out how to properly import the json-editor module into an angular component.
So far I installed the jso-editor with npm and the status is like this.
angular ts
import { Component, OnInit } from '@angular/core';
import * as JSONEditor from '@json-editor/json-editor';
@Component({
selector: 'app-angular-component',
template: `<div id="configuration_editor"></div>`,
})
export class AngularComponent implements OnInit {
configuration_editor: any;
constructor() {
const element = document.getElementById('configuration_editor');
this.configuration_editor = new JSONEditor(element, {});
}
ngOnInit() {}
}
console output
Try `npm install @types/@json-editor/json-editor` if it exists or add a new declaration (.d.ts) file containing `declare module '@json-editor/json-editor';`
Issue Analytics
- State:
- Created 5 years ago
- Comments:13 (3 by maintainers)
Top Results From Across the Web
Angular
Angular is a platform for building mobile and desktop web applications. Join the community of millions of developers who build compelling user interfaces ......
Read more >Implement a single-page application with Angular 2
This tutorial introduces you to the key building blocks of Angular 2 and walks you through coding and running a SPA using Angular...
Read more >Testing Angular 2 and Continuous Integration with Jest
Cut down on test run time by testing Angular 2 and continuous integration with Jest. In this article, using a toy application you'll...
Read more >Angular Integration - Webix
The Webix library is compatible with the Angular (Angular 2+) framework. The integration with earlier versions is below. You can find an example...
Read more >React vs. Angular 2 Integration with Rails - Pluralsight
In this guide, we will compare the React and the Angular 2 integrations using Ruby on Rails. The two approaches will be analyzed...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
To continue @trsh’s good advice, here is a full example:
I was able to make it work importing the package with: