[Fixed] DefaultIterableDiffer in Angular is deprecated. What shall I do now?

Issue

I am learning angular from pro angular 9. The book uses a DefaultIterableDiffer object to detect changes in a collection. When I add the class I get the message that this class is deprecated. I can’t find a replacement immediately. How do I best proceed from here?

Solution

I found the answer myself. Instead of the DefaultIterableDiffer you can use the IterableDiffer class. This does the same job of detecting changes in collections.

Leave a Reply

(*) Required, Your email will not be published