The sdk-viewer component is used for viewing text, such as JSON and arrays, with a 'copy to clipboard' feature.
Using NPM:
npm install --save sdk-viewer
To configure the sdk-viewer
for your application, add the following lines to your app.module.ts file:
import { SDKViewerModule } from 'sdk-viewer';
@NgModule({
imports: [
SDKViewerModule
]
})
export class AppModule { }
-
text (any)
: Text to display (e.g., JSON, array, etc). -
font (string)
: The font family to use. Default: 'Courier New', Courier, monospace. -
color (string)
: The color of the text. Default: white. -
background (string)
: The background color of the viewer. Default: black. -
showLineNumbers (boolean)
: Show line numbers to the left of the content. Default: true.
<sdk-viewer [text]="text"></sdk-viewer>