Answer Posted / 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 |
Post New Answer View All Answers
List the differences between angular 2 components vs. Directives.
Difference between promises and observable?
What are the basic steps to unit test an angularjs filter?
What is injectable in angular2?
What is the main purpose of find index in angularjs?
Explain the compilation process of angularjs?
What is $digest in angularjs?
What is called in angular?
Can't bind to ngmodel since it isn't a known property of input angular?
What is ng-app, ng-init, and ng-model?
What is splice method?
Is angular 2 object oriented?
What is better react or angular?
How do ng models work?
What is emit in angular?