JSON Formatter And Viewer In HTML For Angular | ngx-json-viewer

ngx-json-viewer

ngx-json-viewer is JSON formatted and a viewer for Angular 2/3/4/5/6+.

json formatter and viewer, json viewer – json formatter and json validator online, json-formatter-js example, how to use json formatter, json formatter code beautify

How to make use of it:

Install

npm install ngx-json-viewer
or
yarn add ngx-json-viewer

1. In your app.module.ts, import NgxJsonViewerModule like:

import { NgxJsonViewerModule } from 'ngx-json-viewer';

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

2. In your component:

<ngx-json-viewer [json]="someObject"></ngx-json-viewer>

3. To collapse all nodes at first:

<ngx-json-viewer [json]="someObject" [expanded]="false"></ngx-json-viewer>

4. To expand only 3 levels:

<ngx-json-viewer [json]="someObject" [depth]="3"></ngx-json-viewer>

JSON Formatter And Viewer, ngx-json-viewer Plugin/Github, online json formatter and viewer


See Demo And Download

Official Website(hivivo): Click Here

This superior jQuery/javascript plugin is developed by hivivo. For extra Advanced usage, please go to the official website.

Share