Skip to content

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

License

Notifications You must be signed in to change notification settings

HusFNS/ngx-json-viewer-1

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ngx-json-viewer

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

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

Install

# For Angular 4/5/6/7:
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>

Makes URLs clickable

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

About

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 58.4%
  • CSS 27.2%
  • HTML 14.4%