top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

What is the difference between $scope vs $rootscope?

0 votes
444 views
What is the difference between $scope vs $rootscope?
posted Feb 23, 2018 by anonymous

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

$rootScope refers to an object which is accessible from everywhere of the application we can say it is a global scope of the variable.
$rootScope is a parent object of all whereas $scope angular objects created in a web page.

**$scope** is created with **ng-controller** while **$rootscope** is created with **ng-app** .

answer Feb 26, 2018 by Manish Tiwari
...