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 |
How routing works in angular 2.?
Is angular harder than react?
Write ajax call syntax?
What is use of $routeprovider in angular js?
Is wordpress a framework?
What Are The Security Features Provided By AngularJS?
How to setup and install ionic framework with angular 4?
What are the key features of angular.js?
What is the singleton pattern? How does angular use it?
How does a shaking tree work?
What is data binding? Explain two-way data binding?
Is angularjs difficult to learn?