3 ms·
I thought you could do this since the scope of the transcluded part is a sibling to the isolate scope. "The advantage of transclusion is that the linking funct
by gtremper 13y ago
I thought you could do this since the scope of the transcluded part is a sibling to the isolate scope.
"The advantage of transclusion is that the linking function receives a transclusion function which is pre-bound to the correct scope. In a typical setup the widget creates an isolate scope, but the transclusion is a sibling (rather than a child) of the isolate scope. This makes it possible for the widget to have private state, and the transclusion to be bound to the parent (pre-isolate) scope."
http://docs.angularjs.org/guide/directive http://docs.angularjs.org/guide/directive
- RaphiePS 13y agoOoh, I didn't consider transclusion. For the example I used (an attribute directive), would I make its template literally <div ng-transclude></div>