简体   繁体   English

Angular 中的 DefaultIterableDiffer 已弃用。 我现在该怎么办?

[英]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.

相关问题 Observable `of` 已弃用。 什么是等价物? - Observable `of` deprecated. What is the equivalent? ProvidedIn:Angular 14+ 中的“any”已弃用。 什么是好的替代品? - ProvidedIn: 'any' in Angular 14+ is deprecated. What would be a good replacement? Angular Typescript错误-不推荐使用字符集。 (弃用) - Angular Typescript Error - charset is deprecated. (deprecation) TSLint 正在被弃用。 这对 Angular 有何影响? - TSLint is being deprecated. How does this affect Angular? 全局图标库已弃用。 FortAwesome/angular-fontawesome - Global icon library is deprecated. for FortAwesome/angular-fontawesome 为什么像这样在 subscribe/observable 上使用数据和错误现在在 Angular 中被弃用了? - Why using the data and error on the subscribe/observable like this is now deprecated in angular? 在angular 5.2.1生产中,不赞成使用ules \\ bootstrap \\ dist \\ css \\ bootstrap.cssNode#moveTo。 使用容器#追加 - In angular 5.2.1 production getting …ules\bootstrap\dist\css\bootstrap.cssNode#moveTo was deprecated. Use Container#append 我将Angular CLI更新到6.0.7,现在我想使用Angular 4/5创建一个项目。 怎么做? - I update my Angular CLI to 6.0.7 and now i want to create a project using Angular 4/5. How to do that? angular7构建一个navroute组件,但现在不知道该怎么办 - angular7 building an navroute component but don't know what to do now Angular & NativeScript - 自动生成的作品,现在怎么办? - Angular & NativeScript - Auto generated works, what now?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM