• Overview
@angular/core

createPlatformFactory

function
stable

Creates a factory for a platform. Can be used to provide or override Providers specific to your application's runtime needs, such as PLATFORM_INITIALIZER and PLATFORM_ID.

API

function createPlatformFactory(
  parentPlatformFactory:
    | ((extraProviders?: StaticProvider[] | undefined) => PlatformRef)
    | null,
  name: string,
  providers?: StaticProvider[],
): (extraProviders?: StaticProvider[] | undefined) => PlatformRef;

createPlatformFactory

(extraProviders?: StaticProvider[] | undefined) => PlatformRef

Creates a factory for a platform. Can be used to provide or override Providers specific to your application's runtime needs, such as PLATFORM_INITIALIZER and PLATFORM_ID.

@paramparentPlatformFactory((extraProviders?: StaticProvider[] | undefined) => PlatformRef) | null

Another platform factory to modify. Allows you to compose factories to build up configurations that might be required by different libraries or parts of the application.

@paramnamestring

Identifies the new platform factory.

@paramprovidersStaticProvider[]

A set of dependency providers for platforms created with the new factory.

@returns(extraProviders?: StaticProvider[] | undefined) => PlatformRef
Jump to details