I would like to know if there is a way to access the $scopes variables using the $rootScope such that if a function is defined in scope I can invoke it using $rootscope to or if there is a variable defined using $scope.var1 I could access it using $rootScope to
Every scope have a two property references to its child scopes, namely: That being said, I can't see real business-logic application for such child scope traversal, except for logging/debugging purposes, for example to build scope hierarchy tree, etc. |
|||||||||
|
$scope
is child of$rootScope
simply they maintain inheritance relation between them..and you know parent can not have access to its child...as child can access its parent info..because its generalize.. – Pankaj Parkar Sep 9 '15 at 16:12