Skip to content

Commit f4b5dc2

Browse files
committed
2 parents 4eb53ff + 5ba3753 commit f4b5dc2

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-7
lines changed

libs/mf-tools/src/lib/web-components/router-utils.ts

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,20 @@ export function endsWith(prefix: string): UrlMatcher {
2020
};
2121
}
2222

23-
export function connectRouter(router: Router, useHash = false) {
23+
export function connectRouter(router: Router, useHash = false): void {
24+
let url: string;
2425
if (!useHash) {
25-
router.navigateByUrl(location.pathname.substr(1));
26+
url = `${location.pathname.substr(1)}${location.search}`;
27+
router.navigateByUrl(url);
2628
window.addEventListener('popstate', () => {
27-
router.navigateByUrl(location.pathname.substr(1));
29+
router.navigateByUrl(url);
2830
});
2931
}
3032
else {
31-
router.navigateByUrl(location.hash.substr(1));
33+
url = `${location.hash.substr(1)}${location.search}`;
34+
router.navigateByUrl(url);
3235
window.addEventListener('hashchange', () => {
33-
router.navigateByUrl(location.hash.substr(1));
36+
router.navigateByUrl(url);
3437
});
3538
}
3639
}

libs/mf/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ shared: share({
271271
strictVersion: true,
272272
requiredVersion: 'auto',
273273
includeSecondaries: {
274-
skip: ['@angular/http/testing']
274+
skip: ['@angular/common/http/testing']
275275
}
276276
},
277277
[...]

libs/mf/src/utils/share-utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ function addSecondaries(secondaries: string[], result: Config, shareObject: Conf
112112
}
113113
}
114114

115-
export function shareAll(config: Config = {}, skip: string[] = [], packageJsonPath = ''): void {
115+
export function shareAll(config: Config = {}, skip: string[] = [], packageJsonPath = ''): Config {
116116

117117
if (!packageJsonPath) {
118118
const stack = callsite();

0 commit comments

Comments
 (0)