I have a web application built using AngularJS and it includes various routes / controllers / views / etc.
Several views require directives, which I include. I noticed that when changing the route and loading a new template, the directives from the old template continue to work. Just by creating a directive that will be written to the console, you will continue to register it when loading a new route.
Is there any way to avoid this? It seems to be a waste of memory.
source
share