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

List the differences between angular 2 components vs. Directives.

721


Difference between promises and observable?

806


What are the basic steps to unit test an angularjs filter?

771


What is injectable in angular2?

820


What is the main purpose of find index in angularjs?

777


Explain the compilation process of angularjs?

766


What is $digest in angularjs?

735


What is called in angular?

749


Can't bind to ngmodel since it isn't a known property of input angular?

910


What is ng-app, ng-init, and ng-model?

840


What is splice method?

845


Is angular 2 object oriented?

798


What is better react or angular?

781


How do ng models work?

727


What is emit in angular?

820