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
How do we share data between controllers?
How to validate form in angular 4?
Differentiate between one-way binding and two-way data binding.
How to validate email in angular 4 using formgroup or custom regexp?
How does aot compiler work?
What do you know about internationalization? How will you implement internationalization in angularjs?
How angular.module works?
How to use ng-if/else in angular js?
Why you will do ngondestroy after subscrib?
Explain deep linking in angularjs?
Is wordpress a framework?
How to implement caching in angular 1.x?
Explain what are the key features of angular.js ?
What is @ngmodule in angular 2?
How do you use singleton pattern?