When to use $destroy() function of scope?
Answer / chaitanya
$destroy() - This function permanently detached the current scope with all of its children from the parent scope. This is required when child scopes are no longer needed. Hence, $destroy() function is called to remove these scopes from the browser’s memory.
When $destroy() is called all the watchers and listeners get removed and the object which represented the scope becomes eligible for garbage collection.
| Is This Answer Correct ? | 0 Yes | 1 No |
What is directive in angular?
How to setup angular 2 in visual studio 2017 mvc 5 / 6?
What is routing in javascript?
What is bootstrapping in angular?
Differentiate between @injectable() vs. @Inject()?
What are the attributes can be used during creation of a new angularjs directives?
Tell me which browsers does Angular work with?
How to get actions of event binding in angular 4?
Explain components in angular 2?
what is linking function and type of linking function?
Where can I learn angularjs?
Explain ng-app directive in angular.