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 |
When using ngif if the condition is true. How to display the message and if the condition is false then how to display the message?
Explain service worker in reference to angular js?
Is angularjs extensible?
Explain component decorators in angular 4?
What is a singleton pattern?
What are the advantages of token-based authentication?
What are the purpose of @ngmodule?
What is @inject()? Why use?
What is lazy loading and why is it used for angular?
Explain ui routing in angularjs?
What is $injector and $inject?
Differentiate between dom and bom.