diff --git a/modules/@angular/core/src/application_ref.ts b/modules/@angular/core/src/application_ref.ts index 3defc16114..da93fd0f88 100644 --- a/modules/@angular/core/src/application_ref.ts +++ b/modules/@angular/core/src/application_ref.ts @@ -94,13 +94,13 @@ export function createPlatform(injector: Injector): PlatformRef { * @experimental APIs related to application bootstrap are currently under review. */ export function createPlatformFactory( - parentPlaformFactory: (extraProviders?: Provider[]) => PlatformRef, name: string, + parentPlatformFactory: (extraProviders?: Provider[]) => PlatformRef, name: string, providers: Provider[] = []): (extraProviders?: Provider[]) => PlatformRef { const marker = new OpaqueToken(`Platform: ${name}`); return (extraProviders: Provider[] = []) => { if (!getPlatform()) { - if (parentPlaformFactory) { - parentPlaformFactory( + if (parentPlatformFactory) { + parentPlatformFactory( providers.concat(extraProviders).concat({provide: marker, useValue: true})); } else { createPlatform(ReflectiveInjector.resolveAndCreate( diff --git a/tools/public_api_guard/core/index.d.ts b/tools/public_api_guard/core/index.d.ts index b32d844f9b..8851d4e517 100644 --- a/tools/public_api_guard/core/index.d.ts +++ b/tools/public_api_guard/core/index.d.ts @@ -305,7 +305,7 @@ export interface ContentChildrenDecorator { export declare function createPlatform(injector: Injector): PlatformRef; /** @experimental */ -export declare function createPlatformFactory(parentPlaformFactory: (extraProviders?: Provider[]) => PlatformRef, name: string, providers?: Provider[]): (extraProviders?: Provider[]) => PlatformRef; +export declare function createPlatformFactory(parentPlatformFactory: (extraProviders?: Provider[]) => PlatformRef, name: string, providers?: Provider[]): (extraProviders?: Provider[]) => PlatformRef; /** @stable */ export declare const CUSTOM_ELEMENTS_SCHEMA: SchemaMetadata;