What is $scope? The angular $ scope is a JavaScript object which provide the connectivity between the controller and the view. All the model data bind on view (DOM element) using the $scope for a controller. What is $rootScope? The angularjs $ rootScope is the scope and one application can have only one $rootScope and It use like global variable and access in across application. The angular $rootScope is parent scope and $scopes are child scopes. $scope vs. $rootScope The $rootScope objects updates under a specific controller $scope not for all global controllers. The angular $scope can't be used outside the controller and its only for current controller but the $rootScope can be used anywhere and Its available globally in the application. All app has one-and-only $rootScope and its lifecycle is the same as the app and its all controllers can have. The $apply and $watch are scope methods. You can see the worki
Angular, React, JavaScript, Java, PHP, SQL, C#, Vue, NodeJs, TypeScript and Interview Questions Answers