开源软件名称:ngx-json-view
开源软件地址:https://gitee.com/twp0217/ngx-json-view
开源软件介绍:
ngx-json-viewA JSON View component for Angular 2+ (基于angular 2+ 的JSON展示组件) 安装npm install ngx-json-view --save 使用npm install ngx-json-view --save - 在module导入
NgxJsonViewModule
import { NgxJsonViewModule } from 'ngx-json-view';@NgModule({ declarations: [ AppComponent ], imports: [ BrowserModule, FormsModule, HttpModule, NgxJsonViewModule ], bootstrap: [AppComponent]})export class AppModule { } data = { "name": "twp0217", "url": "https://github.com/twp0217", "string": "github", "number": 88, "boolean": true, "object": { "obj1": "obj1", "obj2": "obj2", "object": { "obj11": "obj11", "obj22": "obj22" }, "emptyArray": [] }, "array": [ 1, 2, 3 ], "date": new Date(), "null": null}; <ngx-json-view [data]="data"></ngx-json-view> 文档data - Object - 数据levelOpen - number - 初始化展开层数(初始值:0)
支持- 如果项目对你有帮助,请点颗星,谢谢。
- 如果你对项目有想法、问题、BUG,欢迎讨论。
|
请发表评论