@@ -160,14 +160,29 @@ class ControlDirectiveHostImpl implements ControlDirectiveHost {
160160
161161 setInputOnDirectives ( inputName : string , value : unknown ) : boolean {
162162 const directiveIndices = this . tNode . inputs ?. [ inputName ] ;
163- if ( ! directiveIndices ) {
163+ const hostDirectiveInputs = this . tNode . hostDirectiveInputs ?. [ inputName ] ;
164+ if ( ! directiveIndices && ! hostDirectiveInputs ) {
164165 return false ;
165166 }
166- for ( const index of directiveIndices ) {
167- const directiveDef = this . tView . data [ index ] as DirectiveDef < unknown > ;
168- const directive = this . lView [ index ] ;
169- writeToDirectiveInput ( directiveDef , directive , inputName , value ) ;
167+
168+ if ( directiveIndices ) {
169+ for ( const index of directiveIndices ) {
170+ const directiveDef = this . tView . data [ index ] as DirectiveDef < unknown > ;
171+ const directive = this . lView [ index ] ;
172+ writeToDirectiveInput ( directiveDef , directive , inputName , value ) ;
173+ }
174+ }
175+
176+ if ( hostDirectiveInputs ) {
177+ for ( let i = 0 ; i < hostDirectiveInputs . length ; i += 2 ) {
178+ const index = hostDirectiveInputs [ i ] as number ;
179+ const internalName = hostDirectiveInputs [ i + 1 ] as string ;
180+ const directiveDef = this . tView . data [ index ] as DirectiveDef < unknown > ;
181+ const directive = this . lView [ index ] ;
182+ writeToDirectiveInput ( directiveDef , directive , internalName , value ) ;
183+ }
170184 }
185+
171186 return true ;
172187 }
173188
0 commit comments