0.1.14 • Published 7 years ago

tap-json-editor v0.1.14

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

angular-json-editor

Simple angular 4 wrapper for json-editor

Usage

Install with npm

npm install --save tap-json-editor

Import the editor module

import { JsonEditorModule } from 'tap-json-editor';

Include it in your root module

@NgModule({
  imports: [
    ...
    JsonEditorModule,
    ...
  ]
})
export default class AppModule {}

Add the component to the template

<div>
  <json-editor [options]="editorOptions" [data]="data"></json-editor >
</div>

Create a component to set options and call methods on the jsoneditor

import { Component, ViewChild } from '@angular/core';
import { JsonEditorComponent, JsonEditorOptions } from 'tap-json-editor';

@Component({
  ...
})
export class DetailComponent {
  public editorOptions: JsonEditorOptions;

  public data: any = {
    ...
  }
  
  @ViewChild(JsonEditorComponent) editor: JsonEditorComponent;
  
  constructor(...) {
    this.editorOptions = new JsonEditorOptions();
  }
 
}
0.1.14

7 years ago

0.1.13

7 years ago

0.1.12

7 years ago

0.1.11

7 years ago

0.1.10

7 years ago

0.1.9

7 years ago

0.1.8

7 years ago

0.1.7

7 years ago

0.1.6

7 years ago

0.1.4

7 years ago

0.1.3

7 years ago

0.1.2

7 years ago

0.1.1

7 years ago