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 is directives in angular 2?
Explain ng-init directive angularjs?
Explain bazel?
What are pipes in angular 2? Explain?
What is difference between constructor and ngoninit?
How to detect swipe event in mobile browsers/devices in AngularJS?
What is the purpost of using $http service and ajax request in angualrjs?
What a digest cycle is in angularjs?
What is rxjs?
Can you explain spa architecture in angularjs?
Why should I learn angular?
How can you decrease the digest cycle time?
Difference between angular 2, 4, 5, 6, &7?
What are pipes in angular 2?
How does the $resource `get` function work synchronously in angularjs ?