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
What are directives in angular 6?
What does injectable mean?
What is the use of interceptors in angular?
What is digest cycle?
What is the use of viewchild in angular?
What is the difference between angularjs and node.js?
How does lazy load work?
How to enable lazy loading in angularjs?
What is isolated scope in angularjs?
In angular js, we need to worry about security holes?
Does Angular use the jQuery library?
Is angular faster than angularjs?
What is singleton pattern? How does angular use it?
What is httpinterceptor in angular?
What is directive role?