Skip to content

Commit 9b83687

Browse files
ADjenkovsis0k0
authored andcommitted
refactor: Use StaticProvider instead of Provider
reason: angular/angular@fcadbf4
1 parent f325b9b commit 9b83687

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

nativescript-angular/platform-common.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ import {
1818
EventEmitter,
1919
Provider,
2020
Sanitizer,
21-
InjectionToken
21+
InjectionToken,
22+
StaticProvider
2223
} from "@angular/core";
2324
import { DOCUMENT } from "@angular/common";
2425

@@ -54,7 +55,7 @@ export interface AppOptions {
5455
startPageActionBarHidden?: boolean;
5556
}
5657

57-
export type PlatformFactory = (extraProviders?: Provider[]) => PlatformRef;
58+
export type PlatformFactory = (extraProviders?: StaticProvider[]) => PlatformRef;
5859

5960
export class NativeScriptSanitizer extends Sanitizer {
6061
sanitize(_context: any, value: string): string {
@@ -70,8 +71,8 @@ export class NativeScriptDocument {
7071

7172
export const COMMON_PROVIDERS = [
7273
defaultPageFactoryProvider,
73-
{ provide: Sanitizer, useClass: NativeScriptSanitizer },
74-
{ provide: DOCUMENT, useClass: NativeScriptDocument },
74+
{ provide: Sanitizer, useClass: NativeScriptSanitizer, deps: [] },
75+
{ provide: DOCUMENT, useClass: NativeScriptDocument, deps: [] },
7576
];
7677

7778
export class NativeScriptPlatformRef extends PlatformRef {

0 commit comments

Comments
 (0)