forked from NativeScript/nativescript-angular
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplatform.ts
More file actions
15 lines (12 loc) · 717 Bytes
/
platform.ts
File metadata and controls
15 lines (12 loc) · 717 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import { PlatformRef, platformCore, createPlatformFactory } from '@angular/core';
import { NativeScriptPlatformRef, AppOptions, PlatformFactory, COMMON_PROVIDERS } from './platform-common';
// "Static" platform
const _platformNativeScript: PlatformFactory = createPlatformFactory(platformCore, 'nativeScript', [...COMMON_PROVIDERS]);
export function platformNativeScriptDynamic(options?: AppOptions, extraProviders?: any[]): PlatformRef {
// Return raw platform to advanced users only if explicitly requested
if (options && options.bootInExistingPage === true) {
return _platformNativeScript(extraProviders);
} else {
return new NativeScriptPlatformRef(_platformNativeScript(extraProviders), options);
}
}