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 |
Define directives in angularjs.
How to import css using system import?
Explain expressions in angularjs?
Who created angular js ?
What is a decorator in angular?
What is pathmatch in angular?
Explain ng-click directive angularjs?
How does a controller work?
Tell me which browsers does Angular work with?
What is @input and @output in angular?
What the different between a directive and component?
What is the difference between Rootscope and Scope in AngularJS?