What is $rootscope in AngularJS ? How is it different from the scope?

devquora
devquora

Posted On: Feb 22, 2018

 

In Angular JS $rootscope and $scope both are an object which is used for sharing data from the controller to view.
The main difference between $rootscope and $scope is that $rootscope is available globally to across all the controllers whereas $scope is available only in controllers that have created it along with its children controllers.

    Related Questions

    Please Login or Register to leave a response.

    Related Questions