Skip to content
This repository has been archived by the owner on Jan 24, 2023. It is now read-only.
/ t-json-viewer Public archive

[DEPRECATED] Angular 2 component for objects debug. Collapsible JSON in HTML with syntax highlight like Chrome DevTools

License

Notifications You must be signed in to change notification settings

sharkich/t-json-viewer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

74 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Angular 2 JSON Viewer Component t-json-viewer v1.2.0

Angular 2 component for objects debug. Collapsible JSON in HTML with syntax highlight like Chrome DevTools http://temich.in.ua/t-json-viewer/

Install

npm install t-json-viewer --save

NPM Package: https://www.npmjs.com/package/t-json-viewer

Usage

Import TJsonViewerModule to have access to following component

import {TJsonViewerModule} from 't-json-viewer';

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

Component

Takes an input [json] that can be data bound to any object.

@Component({
  ...,
  template: `
    <t-json-viewer [json]="asset"></t-json-viewer>
  `
  })
  export class MyComponent {
    ...
    ngOnInit() {
      this.asset = {};
      ...
    }
    ...
  }

Examples

Example: http://temich.in.ua/t-json-viewer/ Example source: https://github.com/temich666/t-json-viewer-example

Outputs

Angular 2 Pretty JSON with syntax highlight

About

[DEPRECATED] Angular 2 component for objects debug. Collapsible JSON in HTML with syntax highlight like Chrome DevTools

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published