@@ -15,6 +15,7 @@ import {
1515 RECORD_TYPE_PRIMITIVE_OP ,
1616 RECORD_TYPE_KEYED_ACCESS ,
1717 RECORD_TYPE_PIPE ,
18+ RECORD_TYPE_BINDING_PIPE ,
1819 RECORD_TYPE_INTERPOLATE
1920 } from './proto_record' ;
2021
@@ -180,14 +181,14 @@ if (${CHANGES_LOCAL} && ${CHANGES_LOCAL}.length > 0) {
180181` ;
181182}
182183
183- function pipeCheckTemplate ( context :string , pipe :string , pipeType :string ,
184+ function pipeCheckTemplate ( context :string , bindingPropagationConfig : string , pipe :string , pipeType :string ,
184185 value :string , change :string , addRecord :string , notify :string ) :string {
185186 return `
186187if (${ pipe } === ${ UTIL } .unitialized()) {
187- ${ pipe } = ${ PIPE_REGISTRY_ACCESSOR } .get('${ pipeType } ', ${ context } );
188+ ${ pipe } = ${ PIPE_REGISTRY_ACCESSOR } .get('${ pipeType } ', ${ context } , ${ bindingPropagationConfig } );
188189} else if (!${ pipe } .supports(${ context } )) {
189190 ${ pipe } .onDestroy();
190- ${ pipe } = ${ PIPE_REGISTRY_ACCESSOR } .get('${ pipeType } ', ${ context } );
191+ ${ pipe } = ${ PIPE_REGISTRY_ACCESSOR } .get('${ pipeType } ', ${ context } , ${ bindingPropagationConfig } );
191192}
192193
193194${ CHANGE_LOCAL } = ${ pipe } .transform(${ context } );
@@ -293,20 +294,20 @@ export class ChangeDetectorJITGenerator {
293294
294295 genHydrate ( ) :string {
295296 return hydrateTemplate ( this . typeName , this . genFieldDefinitions ( ) ,
296- pipeOnDestroyTemplate ( this . getnonNullPipeNames ( ) ) ) ;
297+ pipeOnDestroyTemplate ( this . getNonNullPipeNames ( ) ) ) ;
297298 }
298299
299300 genFieldDefinitions ( ) {
300301 var fields = [ ] ;
301302 fields = fields . concat ( this . fieldNames ) ;
302- fields = fields . concat ( this . getnonNullPipeNames ( ) ) ;
303+ fields = fields . concat ( this . getNonNullPipeNames ( ) ) ;
303304 return fieldDefinitionsTemplate ( fields ) ;
304305 }
305306
306- getnonNullPipeNames ( ) :List < String > {
307+ getNonNullPipeNames ( ) :List < String > {
307308 var pipes = [ ] ;
308309 this . records . forEach ( ( r ) => {
309- if ( r . mode === RECORD_TYPE_PIPE ) {
310+ if ( r . mode === RECORD_TYPE_PIPE || r . mode === RECORD_TYPE_BINDING_PIPE ) {
310311 pipes . push ( this . pipeNames [ r . selfIndex ] ) ;
311312 }
312313 } ) ;
@@ -332,7 +333,7 @@ export class ChangeDetectorJITGenerator {
332333 }
333334
334335 genRecord ( r :ProtoRecord ) :string {
335- if ( r . mode === RECORD_TYPE_PIPE ) {
336+ if ( r . mode === RECORD_TYPE_PIPE || r . mode === RECORD_TYPE_BINDING_PIPE ) {
336337 return this . genPipeCheck ( r ) ;
337338 } else {
338339 return this . genReferenceCheck ( r ) ;
@@ -345,11 +346,12 @@ export class ChangeDetectorJITGenerator {
345346 var newValue = this . localNames [ r . selfIndex ] ;
346347 var oldValue = this . fieldNames [ r . selfIndex ] ;
347348 var change = this . changeNames [ r . selfIndex ] ;
349+ var bpc = r . mode === RECORD_TYPE_BINDING_PIPE ? "this.bindingPropagationConfig" : "null" ;
348350
349351 var addRecord = addSimpleChangeRecordTemplate ( r . selfIndex - 1 , oldValue , newValue ) ;
350352 var notify = this . genNotify ( r ) ;
351353
352- return pipeCheckTemplate ( context , pipe , r . name , newValue , change , addRecord , notify ) ;
354+ return pipeCheckTemplate ( context , bpc , pipe , r . name , newValue , change , addRecord , notify ) ;
353355 }
354356
355357 genReferenceCheck ( r :ProtoRecord ) :string {
0 commit comments