角树组件在组件中不起作用 [英] angular-tree-component not working in component

查看:73
本文介绍了角树组件在组件中不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在使用jhipster gen一个Web应用程序,需要在组件中显示一棵树,根据 https://angular2-tree.readme.io/docs 的文档在main.component.html和main.component.ts中将其显示为OK,但在home.component.html和home.component.ts中添加相同的代码,则会呈现空节点.

I had been use jhipster gen a web application,need display a tree in component, according doc of https://angular2-tree.readme.io/docs in main.component.html, and main.component.ts add it display OK, but in home.component.html and home.component.ts add same code, it render empty node.

推荐答案

在home.modules.ts中添加以下行从"angular-tree-component"导入{TreeModule};然后导入TreeModule,就可以了.

in home.modules.ts add follow line import { TreeModule} from 'angular-tree-component'; then import TreeModule,it is OK.

这篇关于角树组件在组件中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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