最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

tree - NestedTreeControl is deprecated, what should I use in Angular v19 now? - Stack Overflow

programmeradmin1浏览0评论

I am upgrading an Angular app to version 19. After the upgrade, I found out that NestedTreeControl is deprecated. Even though it is still available, my IDE shows that

@deprecated Use one of levelAccessor or childrenAccessor instead. To be removed in a future version.

I wanted to replace the functionality by reading the official documentation but no luck; the documentation is not complete, and comments suggest to replace it with childrenAccessor, but some of the functionalities, like

this.treeControl.expand(node);

are not available anymore in childrenAccessor.

I cannot provide the source code, but I would appreciate it if anyone could give some examples with Angular 19 and Material Components v3 that show how we can use nodes' expanded functionality in the newer version of the Tree component.

发布评论

评论列表(0)

  1. 暂无评论