Do I need to do anything to clear $ watch-es when they are $ destroy'd?

I would like to avoid memory leaks, so I wonder if $watch es are automatically deleted when the $destroy 'd area, or what to do to clear it?

+4
source share
1 answer

As $ destroy () docs says:

Deletion means that calls to $ digest () will no longer extend to the current region and its children.

This means that your $ hour clock will no longer start as soon as your area is destroyed, because it can only be processed by the $ digest cycle, which is canceled when the area is destroyed.

+3
source

All Articles