Skip to content
This repository has been archived by the owner on Feb 22, 2018. It is now read-only.

Commit

Permalink
fix(tagging compiler): ancestor injectables
Browse files Browse the repository at this point in the history
Conflicts:
	lib/core_dom/tagging_compiler.dart
  • Loading branch information
jbdeboer committed Mar 17, 2014
1 parent 775ad57 commit 81ad184
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/core_dom/tagging_compiler.dart
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class TaggingCompiler implements Compiler {
if (node.nodeType == 1) {

var taggedElementBinder = null;
int taggedElementBinderIndex = -1;
int taggedElementBinderIndex = parentElementBinderOffset;
if (elementBinder.hasDirectivesOrEvents || elementBinder.hasTemplate) {
taggedElementBinder = _addBinder(elementBinders,
new TaggedElementBinder(elementBinder, parentElementBinderOffset));
Expand Down
13 changes: 13 additions & 0 deletions test/core_dom/compiler_spec.dart
Original file line number Diff line number Diff line change
Expand Up @@ -582,6 +582,19 @@ void main() {

expect(element.text).toContain('my data');
});

it('should expose a ancestor controller to the scope of its children thru a undecorated element', (TestBed _) {
var element = _.compile(
'<div my-parent-controller>'
'<div>'
'<div my-child-controller>{{ my_parent.data() }}</div>'
'</div>'
'</div>');

_.rootScope.apply();

expect(element.text).toContain('my data');
});
});


Expand Down

0 comments on commit 81ad184

Please sign in to comment.