1
1
import 'globals' ;
2
- global . window = global ;
3
2
import "zone.js/dist/zone-node"
4
3
5
4
import 'reflect-metadata' ;
6
5
import './polyfills/array' ;
6
+ import { SanitizationService } from '@angular/core/src/security' ;
7
7
import { isPresent , Type , print } from '@angular/core/src/facade/lang' ;
8
8
import { ReflectiveInjector , reflector , coreLoadAndBootstrap , createPlatform ,
9
9
getPlatform , assertPlatform , ComponentRef , PlatformRef , PLATFORM_DIRECTIVES , PLATFORM_PIPES } from '@angular/core' ;
10
10
import { bind , provide , Provider } from '@angular/core/src/di' ;
11
11
12
12
import { RootRenderer , Renderer } from '@angular/core/src/render/api' ;
13
13
import { NativeScriptRootRenderer , NativeScriptRenderer } from './renderer' ;
14
- import { NativeScriptDomAdapter , NativeScriptElementSchemaRegistry } from './dom_adapter' ;
14
+ import { NativeScriptDomAdapter , NativeScriptElementSchemaRegistry , NativeScriptSanitizationService } from './dom_adapter' ;
15
15
import { ElementSchemaRegistry , XHR , COMPILER_PROVIDERS } from '@angular/compiler' ;
16
16
import { FileSystemXHR } from './xhr' ;
17
17
import { Parse5DomAdapter } from '@angular/platform-server/src/parse5_adapter' ;
@@ -46,7 +46,7 @@ class ConsoleLogger {
46
46
}
47
47
48
48
export function bootstrap ( appComponentType : any ,
49
- customProviders : ProviderArray = null ) : Promise < ComponentRef > {
49
+ customProviders : ProviderArray = null ) : Promise < ComponentRef < any > > {
50
50
NativeScriptDomAdapter . makeCurrent ( ) ;
51
51
52
52
let platformProviders : ProviderArray = [
@@ -69,6 +69,7 @@ export function bootstrap(appComponentType: any,
69
69
provide ( RootRenderer , { useClass : NativeScriptRootRenderer } ) ,
70
70
NativeScriptRenderer ,
71
71
provide ( Renderer , { useClass : NativeScriptRenderer } ) ,
72
+ provide ( SanitizationService , { useClass : NativeScriptSanitizationService } ) ,
72
73
provide ( ElementSchemaRegistry , { useClass : NativeScriptElementSchemaRegistry } ) ,
73
74
COMPILER_PROVIDERS ,
74
75
provide ( ElementSchemaRegistry , { useClass : NativeScriptElementSchemaRegistry } ) ,
@@ -90,7 +91,7 @@ export function bootstrap(appComponentType: any,
90
91
return coreLoadAndBootstrap ( appInjector , appComponentType ) ;
91
92
}
92
93
93
- export function nativeScriptBootstrap ( appComponentType : any , customProviders ?: ProviderArray , appOptions ?: AppOptions ) : Promise < ComponentRef > {
94
+ export function nativeScriptBootstrap ( appComponentType : any , customProviders ?: ProviderArray , appOptions ?: AppOptions ) : Promise < ComponentRef < any > > {
94
95
if ( appOptions && appOptions . cssFile ) {
95
96
application . cssFile = appOptions . cssFile ;
96
97
}
0 commit comments