Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

When to use $destroy() function of scope?

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


Please Help Members By Posting Answers For Below Questions

How do we share data between controllers?

861


How to validate form in angular 4?

819


Differentiate between one-way binding and two-way data binding.

808


How to validate email in angular 4 using formgroup or custom regexp?

870


How does aot compiler work?

780


What do you know about internationalization? How will you implement internationalization in angularjs?

779


How angular.module works?

904


How to use ng-if/else in angular js?

984


Why you will do ngondestroy after subscrib?

881


Explain deep linking in angularjs?

858


Is wordpress a framework?

871


How to implement caching in angular 1.x?

895


Explain what are the key features of angular.js ?

889


What is @ngmodule in angular 2?

830


How do you use singleton pattern?

866