[英]DefaultIterableDiffer in Angular is deprecated. What shall I do now?
I am learning angular from pro angular 9. The book uses a DefaultIterableDiffer object to detect changes in a collection.我正在向专业 angular 9 学习 angular。这本书使用 DefaultIterableDiffer object 来检测集合中的变化。 When I add the class I get the message that this class is deprecated.
当我添加 class 时,我收到此 class 已弃用的消息。 I can't find a replacement immediately.
我无法立即找到替代品。 How do I best proceed from here?
我如何最好地从这里开始?
I found the answer myself.我自己找到了答案。 Instead of the DefaultIterableDiffer you can use the IterableDiffer class.
您可以使用IterableDiffer class 而不是 DefaultIterableDiffer。 This does the same job of detecting changes in collections.
这与检测 collections 中的变化相同。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.