File tree 2 files changed +14
-1
lines changed
2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ class TaggingCompiler implements Compiler {
50
50
if (node.nodeType == 1 ) {
51
51
52
52
var taggedElementBinder = null ;
53
- int taggedElementBinderIndex = - 1 ;
53
+ int taggedElementBinderIndex = parentElementBinderOffset ;
54
54
if (elementBinder.hasDirectivesOrEvents || elementBinder.hasTemplate) {
55
55
taggedElementBinder = _addBinder (elementBinders,
56
56
new TaggedElementBinder (elementBinder, parentElementBinderOffset));
Original file line number Diff line number Diff line change @@ -582,6 +582,19 @@ void main() {
582
582
583
583
expect (element.text).toContain ('my data' );
584
584
});
585
+
586
+ it ('should expose a ancestor controller to the scope of its children thru a undecorated element' , (TestBed _) {
587
+ var element = _.compile (
588
+ '<div my-parent-controller>'
589
+ '<div>'
590
+ '<div my-child-controller>{{ my_parent.data() }}</div>'
591
+ '</div>'
592
+ '</div>' );
593
+
594
+ _.rootScope.apply ();
595
+
596
+ expect (element.text).toContain ('my data' );
597
+ });
585
598
});
586
599
587
600
You can’t perform that action at this time.
0 commit comments