Difference between $scope and $rootScope

后端 未结 9 1809
孤城傲影
孤城傲影 2020-11-28 02:33

Can anyone explain the difference between $scope and $rootScope?

I think

$scope:

We can get ng-model properties in particular cont

9条回答
  •  悲哀的现实
    2020-11-28 02:50

    $rootScope is available globally, no matter what controller you are in, whereas $scope is only available to the current controller and it's children.

提交回复
热议问题