Registry /
testing / ngx-json-viewer-scrolling
Install & Compatibility
Where this runs
No compatibility data collected yet for this library.
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
NgxJsonViewerModule
✓ import { NgxJsonViewerModule } from 'ngx-json-viewer-scrolling'
✗ import { NgxJsonViewerModule } from 'ngx-json-viewer'
The package name is 'ngx-json-viewer-scrolling', not 'ngx-json-viewer'. The latter is a different package.
NgxJsonViewerComponent
✓ import { NgxJsonViewerComponent } from 'ngx-json-viewer-scrolling'
Use this if you need a direct reference to the component class.
NgxJsonViewerModule (standalone)
✓ import { NgxJsonViewerComponent } from 'ngx-json-viewer-scrolling'
✗ import { NgxJsonViewerModule } from 'ngx-json-viewer-scrolling'
In Angular 14+, standalone components may not require NgxJsonViewerModule; import the component directly.
Shows installation and basic usage: import module, use component with json input and optional expanded binding.
// app.module.ts
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { NgxJsonViewerModule } from 'ngx-json-viewer-scrolling';
import { AppComponent } from './app.component';
@NgModule({
imports: [
BrowserModule,
NgxJsonViewerModule
],
declarations: [AppComponent],
bootstrap: [AppComponent]
})
export class AppModule { }
// app.component.ts
import { Component } from '@angular/core';
@Component({
selector: 'app-root',
template: '<ngx-json-viewer [json]="data" [expanded]="false"></ngx-json-viewer>'
})
export class AppComponent {
data = { name: 'ngx-json-viewer', version: 2, features: ['collapsible', 'scrolling'] };
}
Errors
Common errors & fixes
Cannot find module 'ngx-json-viewer' or its corresponding type declarations.
Import path in code uses 'ngx-json-viewer' instead of 'ngx-json-viewer-scrolling'.
fixChange import to 'ngx-json-viewer-scrolling'
ERROR in The target entry-point "ngx-json-viewer-scrolling" has missing dependencies: @angular/core @angular/common rxjs
Missing peer dependencies for Angular and RxJS.
fixInstall required peer deps: npm install @angular/core @angular/common rxjs
Audit
Dependencies
@angular/coreoptionalRequired for Angular component functionality
@angular/commonoptionalRequired for Angular directives and pipes
rxjsoptionalRequired for reactive streams