From 73fb4b83b22632ad7f2737ff3ba96e52f707938a Mon Sep 17 00:00:00 2001 From: Florian Tischler Date: Wed, 12 Jan 2022 10:47:11 +0100 Subject: [PATCH 1/3] Update README.md --- libs/mf/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/mf/README.md b/libs/mf/README.md index a206189e..30bd89d9 100644 --- a/libs/mf/README.md +++ b/libs/mf/README.md @@ -271,7 +271,7 @@ shared: share({ strictVersion: true, requiredVersion: 'auto', includeSecondaries: { - skip: ['@angular/http/testing'] + skip: ['@angular/common/http/testing'] } }, [...] From ea2150804b8c594000019c6ef9f224539b260975 Mon Sep 17 00:00:00 2001 From: Florian Tischler Date: Wed, 12 Jan 2022 11:02:35 +0100 Subject: [PATCH 2/3] fix typing of shareAll --- libs/mf/src/utils/share-utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/mf/src/utils/share-utils.ts b/libs/mf/src/utils/share-utils.ts index 4d39d02a..ae114cb1 100644 --- a/libs/mf/src/utils/share-utils.ts +++ b/libs/mf/src/utils/share-utils.ts @@ -101,7 +101,7 @@ function addSecondaries(secondaries: string[], result: Config, shareObject: Conf } } -export function shareAll(config: Config = {}, skip: string[] = [], packageJsonPath = ''): void { +export function shareAll(config: Config = {}, skip: string[] = [], packageJsonPath = ''): Config { if (!packageJsonPath) { const stack = callsite(); From cf8e2cdc22fa3b534e72030f3e040f939bfda8d6 Mon Sep 17 00:00:00 2001 From: Vugar_Abdullayev Date: Wed, 19 Jan 2022 12:15:37 +0100 Subject: [PATCH 3/3] connectrouter add query params support --- .../mf-tools/src/lib/web-components/router-utils.ts | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/libs/mf-tools/src/lib/web-components/router-utils.ts b/libs/mf-tools/src/lib/web-components/router-utils.ts index 8feac8e9..feb148e6 100644 --- a/libs/mf-tools/src/lib/web-components/router-utils.ts +++ b/libs/mf-tools/src/lib/web-components/router-utils.ts @@ -20,17 +20,20 @@ export function endsWith(prefix: string): UrlMatcher { }; } -export function connectRouter(router: Router, useHash = false) { +export function connectRouter(router: Router, useHash = false): void { + let url: string; if (!useHash) { - router.navigateByUrl(location.pathname.substr(1)); + url = `${location.pathname.substr(1)}${location.search}`; + router.navigateByUrl(url); window.addEventListener('popstate', () => { - router.navigateByUrl(location.pathname.substr(1)); + router.navigateByUrl(url); }); } else { - router.navigateByUrl(location.hash.substr(1)); + url = `${location.hash.substr(1)}${location.search}`; + router.navigateByUrl(url); window.addEventListener('hashchange', () => { - router.navigateByUrl(location.hash.substr(1)); + router.navigateByUrl(url); }); } } \ No newline at end of file