What is $scope and $rootScope?

Answer Posted / chaitanya

The $rootScope is the top-most scope. An app can have only one $rootScope which will be shared among all the components of an app. Hence it acts like a global variable. All other $scopes are children of the $rootScope.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain what are the key features of angular.js ?

442


What are post linking and pre-linking functions?

417


What are the advantages and disadvantages of art compilation?

434


How to create custom directives?

449


What are pipes in angular 2?

466






Enlist major matchers available in jasmine?

443


What selector forces a style down through the child component tree into all the child component views?

448


What is traceur compiler in angular?

427


What is component in angularjs 2 ?

487


What is a template angular?

383


What is module in angular?

405


What is npm command?

401


Explain life cycle in angular?

430


Is angular a oop?

416


Explain how logs are maintained in angularjs?

421