This repository was archived by the owner on Feb 22, 2018. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +23
-2
lines changed Expand file tree Collapse file tree 2 files changed +23
-2
lines changed Original file line number Diff line number Diff line change 1
1
part of angular;
2
2
3
3
class NgShadowDomAttrDirective {
4
+ Block block;
4
5
NgShadowDomAttrDirective (BlockList list, dom.Element element) {
5
- var block = list.newBlock ();
6
+ block = list.newBlock ();
6
7
var shadowRoot = element.createShadowRoot ();
7
8
for (var i = 0 , ii = block.elements.length; i < ii; i++ ) {
8
9
shadowRoot.append (block.elements[i]);
9
10
}
10
11
}
11
12
12
- attach (Scope scope) {}
13
+ attach (Scope scope) {
14
+ block.attach (scope);
15
+ }
13
16
}
Original file line number Diff line number Diff line change @@ -63,6 +63,24 @@ main() {
63
63
expect (element.html ()).toEqual ('<!--ANCHOR: ng-repeat=item in items-->' );
64
64
}));
65
65
66
+ xit ('should compile repeater with children' , inject (() {
67
+ var element = $('<div><div ng-repeat="item in items"><div ng-bind="item"></div></div></div>' );
68
+ var template = $compile (element);
69
+
70
+ $rootScope.items = ['A' , 'b' ];
71
+ template (element).attach ($rootScope);
72
+
73
+ expect (element.text ()).toEqual ('' );
74
+ // TODO(deboer): Digest twice until we have dirty checking in the scope.
75
+ $rootScope.$digest ();
76
+ $rootScope.$digest ();
77
+ expect (element.text ()).toEqual ('Ab' );
78
+
79
+ $rootScope.items = [];
80
+ $rootScope.$digest ();
81
+ expect (element.html ()).toEqual ('<!--ANCHOR: ng-repeat=item in items-->' );
82
+ }));
83
+
66
84
67
85
xit ('should compile multi-root repeater' , inject (() {
68
86
var element = $(
You can’t perform that action at this time.
0 commit comments