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 @injectable in angular?
What would be a good use case for having your own routing module?
What is Dependency Injection in AngularJS?
How many types of data bindings are there in angularjs?
What is typeofchecks in angular 8?
Explain what is injector in angularjs?
How to access the angular $scope variable in browsers console?
Which css framework is best?
Explain $scope in angular?
What is eventemitter in angular?
What are the key features/concepts of Angular.js?
Is angularjs dependent on jquery?