* Use this with `multi` `viewProviders`. * * This factory knows how to concatenate itself with the existing `multi` `providers`.
( this: NodeInjectorFactory, _: undefined, _flags: InternalInjectFlags | undefined, _tData: TData, lView: LView, tNode: TDirectiveHostNode, )
| 334 | * This factory knows how to concatenate itself with the existing `multi` `providers`. |
| 335 | */ |
| 336 | function multiViewProvidersFactoryResolver( |
| 337 | this: NodeInjectorFactory, |
| 338 | _: undefined, |
| 339 | _flags: InternalInjectFlags | undefined, |
| 340 | _tData: TData, |
| 341 | lView: LView, |
| 342 | tNode: TDirectiveHostNode, |
| 343 | ): any[] { |
| 344 | const factories = this.multi!; |
| 345 | let result: any[]; |
| 346 | if (this.providerFactory) { |
| 347 | const componentCount = this.providerFactory.componentProviders!; |
| 348 | const multiProviders = getNodeInjectable( |
| 349 | lView, |
| 350 | lView[TVIEW], |
| 351 | this.providerFactory!.index!, |
| 352 | tNode, |
| 353 | ); |
| 354 | // Copy the section of the array which contains `multi` `providers` from the component |
| 355 | result = multiProviders.slice(0, componentCount); |
| 356 | // Insert the `viewProvider` instances. |
| 357 | multiResolve(factories, result); |
| 358 | // Copy the section of the array which contains `multi` `providers` from other directives |
| 359 | for (let i = componentCount; i < multiProviders.length; i++) { |
| 360 | result.push(multiProviders[i]); |
| 361 | } |
| 362 | } else { |
| 363 | result = []; |
| 364 | // Insert the `viewProvider` instances. |
| 365 | multiResolve(factories, result); |
| 366 | } |
| 367 | return result; |
| 368 | } |
| 369 | |
| 370 | /** |
| 371 | * Maps an array of factories into an array of values. |
nothing calls this directly
no test coverage detected
searching dependent graphs…