JSPM

ngx-json-viewer2

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 7
  • Score
    100M100P100Q43594F
  • License MIT

JSON formatter / viewer for Angular 2/4/5/6+

Package Exports

  • ngx-json-viewer2

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (ngx-json-viewer2) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

ngx-json-viewer

JSON formatter and viewer for Angular 2/4/5/6+

Live demo: https://stackblitz.com/edit/ngx-json-viewer

Install

# For Angular 4/5/6:
npm install ngx-json-viewer

# For Angular 2:
npm install ngx-json-viewer@1

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

Usage

In your app.module.ts import NgxJsonViewerModule like

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

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

In your component:

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

To collapse all nodes at first:

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