All applications have a $rootScope which is the scope created on the HTML element that contains the ng-app directive. The rootScope is available in the entire application. If a variable has the same name in both the current scope and in the rootScope, the application use the one in the current scope.
The rootScope's favorite color:
The scope of the controller's favorite color:
The rootScope's favorite color is still:
Notice that controller's color variable does not overwrite the rootScope's color value.