Angular:JSON数据的树状视图 [英] Angular: tree view from json data

查看:70
本文介绍了Angular:JSON数据的树状视图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是新手.我想在angular 5中创建一个可扩展树.我尝试使用Angular-tree-component和ngx-treeview.但是它们的问题在于它们需要使用specif格式的json.有没有读取任何类型的json并创建可扩展树的库?还是我需要以这种npm模块将需要的格式转换json?

I am new to angular. I want to create a expandable tree in angular 5. I have tried to using Angular-tree-component and ngx-treeview. but the problem with them is they need a json in specif format. is there any library which reads a any type of json and creates a expandable tree ? or do I need to convert my json in the format this npm modules will need it ?

我想做类似tree-grid-directive( http://khan4019.github.io/tree-grid-directive/test/treeGrid.html )在angular js 1中提供.

I want to do something like tree-grid-directive(http://khan4019.github.io/tree-grid-directive/test/treeGrid.html) is providing in angular js 1.

推荐答案

我通过使用 https://www.npmjs.com/package/angular4-jsoneditor .我在查看模式下使用它.

I solved my problem by using https://www.npmjs.com/package/angular4-jsoneditor. I am using it in view mode.

这篇关于Angular:JSON数据的树状视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆