Creating custom ngFor directive

落花浮王杯 提交于 2019-12-11 13:14:51

问题


My case, I'm performing ngFor over ES6 collections that get filtered through pipe and converted into array, but when collection contains over 5000 elements ui starts acting sluggy, trivial performance profiling shown that creating large array per every dirty check is overkill, while iteration itself is fast.

So I would like to implement my own ngFor directive that would be capable of iterating through ES6 iterables.

It was simple in Angular 1, but it doesn't seem as easy in Angular 2, where should I start looking to accomplish that?

来源:https://stackoverflow.com/questions/39196756/creating-custom-ngfor-directive

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!