I already know how transcription works (on the first level, only I guess), bUt I have a question about the nested interception area.
So, I have this code:
<body ng-app="docsTabsExample" ng-controller="ctrl"> <my-tabs> <my-pane title="Hello"> <h4>Hello , The value of "i" is => {{i}}</h4> </my-pane> </my-tabs> </body>
Mostly I have controller , <my-tabs> and <my-pane > .
Looking at the myTabs directive:
.directive('myTabs', function() { return { restrict: 'E', transclude: true, scope: {}, controller: ['$scope', function($scope) { $scope.i = 2; }], template: '<div ng-transclude></div>' }; })
I know that the contents of the directive will have access to the external scope
Thus, the yellow part will have access to the external area (which is the main area of ββthe controller):

Here is the code for the myPane directive:
.directive('myPane', function() { return { require: '^myTabs', restrict: 'E', transclude: true, scope: { }, controller: function($scope) { $scope.i = 4;
The program begins with:
.controller('ctrl', function($scope) { $scope.i = 1000; })
Program Output:
Hi, the value of "i" is = 1000
But
According to the documentation: myPane's transcluded data must have access to the external scope of the directive, which is the myTabs directive, which has the value i=2 .
But myPane has an isolated scope, so it does NOT inherit the scope from myTabs .
Question
Does it go one level more higher into the controller area to get i=1000 ? (Clarification, I do not ask how I can do i get a different value - I ask why / how it matters 1000).
I mean, what does the area hierarchy look like?
This is true?
controller scope | +--------+---------+ | | myTabs mypanes's transcluded transcluded data scope data scope
the docs say:
The transclude parameter changes the way the areas are nested. This makes the contents of the transclosed directive have any scope outside the directive , and not any scope inside. This gives access to content for the outside area.
But what is the scope outside the myPane directive?
In other words, why / how i=1000 ?
FULL PLUNKER
CHANGE FROM AFTER RESPONSE
After installing and configuring PeriScope (from @MarkRajcok), I now see it visually:
