Skip to content

Commit 20d48ee

Browse files
authored
Merge pull request #1753 from NativeScript/minor-fixes
refactor: minor changes after review
2 parents a77683e + 738b15d commit 20d48ee

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

nativescript-angular/router/ns-platform-location.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { routerLog, isLogEnabled } from "../trace";
66
@Injectable()
77
export class NativescriptPlatformLocation extends PlatformLocation {
88

9-
constructor(private locationStartegy: NSLocationStrategy) {
9+
constructor(private locationStrategy: NSLocationStrategy) {
1010
super();
1111
if (isLogEnabled()) {
1212
routerLog("NativescriptPlatformLocation.constructor()");
@@ -18,7 +18,7 @@ export class NativescriptPlatformLocation extends PlatformLocation {
1818
}
1919

2020
onPopState(fn: LocationChangeListener): void {
21-
this.locationStartegy.onPopState(fn);
21+
this.locationStrategy.onPopState(fn);
2222
}
2323

2424
onHashChange(_fn: LocationChangeListener): void {
@@ -31,25 +31,25 @@ export class NativescriptPlatformLocation extends PlatformLocation {
3131
return "";
3232
}
3333
get pathname(): string {
34-
return this.locationStartegy.path();
34+
return this.locationStrategy.path();
3535
}
3636
set pathname(_newPath: string) {
3737
throw new Error("NativescriptPlatformLocation set pathname - not implemented");
3838
}
3939

4040
pushState(state: any, title: string, url: string): void {
41-
this.locationStartegy.pushState(state, title, url, null);
41+
this.locationStrategy.pushState(state, title, url, null);
4242
}
4343

4444
replaceState(state: any, title: string, url: string): void {
45-
this.locationStartegy.replaceState(state, title, url, null);
45+
this.locationStrategy.replaceState(state, title, url, null);
4646
}
4747

4848
forward(): void {
4949
throw new Error("NativescriptPlatformLocation.forward() - not implemented");
5050
}
5151

5252
back(): void {
53-
this.locationStartegy.back();
53+
this.locationStrategy.back();
5454
}
5555
}

nativescript-angular/router/router.module.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ const NS_ROUTER_PROVIDERS = [
2929
},
3030
{ provide: LocationStrategy, useExisting: NSLocationStrategy },
3131
NativescriptPlatformLocation,
32-
{ provide: PlatformLocation, useClass: NativescriptPlatformLocation },
32+
{ provide: PlatformLocation, useExisting: NativescriptPlatformLocation },
3333
RouterExtensions,
3434
NSRouteReuseStrategy,
3535
{ provide: RouteReuseStrategy, useExisting: NSRouteReuseStrategy },

0 commit comments

Comments
 (0)