Science, asked by sarthaksingh8782, 1 year ago

What does $rootScope mean in AngularJs?

Answers

Answered by Sushank2003
2
To understand the difference between $scope and $rootscope variable let us first understand what are these variable. So starting with $scope.
$scope is the variable that binds out HTML with JavaScript. It is a javaScript object. We know that AngularJS works on MVC(Model-View-Controller) model, so our view is the HTML which is visible to client , Model is the data entered by client and controller which is our JavaScript. $scope helps in communication between these two. It will be available to both view and controller
Similar questions