@@ -116,8 +116,9 @@ export class ProtoViewFactory {
116116 var sortedDirectives = ListWrapper . map ( elementBinders , b => new SortedDirectives ( b . directives , directives ) ) ;
117117
118118 var variableBindings = this . _createVariableBindings ( renderProtoView ) ;
119- var protoLocals = this . _createProtoLocals ( renderProtoView ) ;
119+ var protoLocals = this . _createProtoLocals ( variableBindings ) ;
120120 var variableNames = this . _createVariableNames ( parentProtoView , protoLocals ) ;
121+
121122 var protoChangeDetector = this . _createProtoChangeDetector ( elementBinders , sortedDirectives , componentBinding , variableNames ) ;
122123 var protoView = new AppProtoView ( renderProtoView . render , protoChangeDetector , variableBindings , protoLocals , variableNames ) ;
123124
@@ -128,9 +129,9 @@ export class ProtoViewFactory {
128129 return protoView ;
129130 }
130131
131- _createProtoLocals ( renderProtoView ) :Map {
132+ _createProtoLocals ( varBindings : Map ) :Map {
132133 var protoLocals = MapWrapper . create ( ) ;
133- MapWrapper . forEach ( renderProtoView . variableBindings , ( mappedName , varName ) => {
134+ MapWrapper . forEach ( varBindings , ( mappedName , varName ) => {
134135 MapWrapper . set ( protoLocals , mappedName , null ) ;
135136 } ) ;
136137 return protoLocals ;
@@ -141,6 +142,11 @@ export class ProtoViewFactory {
141142 MapWrapper . forEach ( renderProtoView . variableBindings , ( mappedName , varName ) => {
142143 MapWrapper . set ( variableBindings , varName , mappedName ) ;
143144 } ) ;
145+ ListWrapper . forEach ( renderProtoView . elementBinders , binder => {
146+ MapWrapper . forEach ( binder . variableBindings , ( mappedName , varName ) => {
147+ MapWrapper . set ( variableBindings , varName , mappedName ) ;
148+ } ) ;
149+ } ) ;
144150 return variableBindings ;
145151 }
146152
0 commit comments