feat(router): add hash-based navigation option to setUpLocationSync (#28609)

The `setUpLocationSync` function in @angular/router/upgrade didn't previously let you sync hash-based navigations. With this change, you can now pass an option to `setUpLocationSync` that will make sure location changes run in Angular in hash-based apps.

Fixes #24429 #21995

PR Close #28609
This commit is contained in:
Jason Aden
2019-02-07 16:13:30 -08:00
committed by Igor Minar
parent 9a51528072
commit fc895ba189
3 changed files with 37 additions and 3 deletions

View File

@ -5,4 +5,4 @@ export declare const RouterUpgradeInitializer: {
deps: (typeof UpgradeModule)[];
};
export declare function setUpLocationSync(ngUpgrade: UpgradeModule): void;
export declare function setUpLocationSync(ngUpgrade: UpgradeModule, urlType?: 'path' | 'hash'): void;