You can create a copy of cards
than Angular2, change detection detects a change and starts the channel again.
You can make unclean piping
@Pipe({ name: 'sortByType', pure: false})
this causes your pipe to run every time change detection is performed.
You can perform a custom change using IterableDiffer and return the caching result when the array has not actually changed.
With this option, you must be careful not to cause serious performance degradation.
- You can pass an additional parameter to the updated channel (for example, a number that increases each time the array changes.
Thus, the channel is invoked because Angular change detection invokes the channel every time a value or parameter changes.
The disadvantage is that it is a little more cumbersome to use.
source share