AngularJS Example:

HTML

<script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.7.2/angular.min.js"></script>

<div ng-app>
  <div ng-controller="CtrlA">
       <div ng-controller="CtrlB">
          <div ng-controller="CtrlC">
              <div ng-controller="CtrlD">
{{foo}} {{bar}} {{foobar}}                  
              </div>
          </div>
      </div>
  </div>
</div>

CSS

</style> <!-- Ugly Hack due to jsFiddle issue: http://goo.gl/BUfGZ --> 
<link rel="stylesheet" href="http://twitter.github.com/bootstrap/assets/css/bootstrap.css">
<script src="http://code.angularjs.org/angular-1.0.1.min.js"></script>
<style>

JavaScript

function CtrlA($scope) {
    $scope.foo = 'fooA';
}

function CtrlB($scope) {

}

function CtrlC($scope) {
    $scope.bar = 'barC';
    console.log($scope.foo);
}

function CtrlD($scope) {
    $scope.foobar = 'foobarD';
    console.log($scope.foo,$scope.bar);
}