File tree Expand file tree Collapse file tree 2 files changed +3
-12
lines changed
libs/mf-tools/src/lib/web-components Expand file tree Collapse file tree 2 files changed +3
-12
lines changed Original file line number Diff line number Diff line change @@ -7,10 +7,9 @@ import {
7
7
PlatformRef ,
8
8
Type ,
9
9
Version ,
10
- VERSION ,
11
10
} from '@angular/core' ;
12
11
import { platformBrowser } from '@angular/platform-browser' ;
13
- import { APP_BASE_HREF } from '@angular/common ' ;
12
+ import { VERSION } from '@angular/core ' ;
14
13
import {
15
14
getGlobalStateSlice ,
16
15
setGlobalStateSlice ,
@@ -212,13 +211,12 @@ function shareShellZone(injector: Injector) {
212
211
213
212
function connectMicroFrontendRouter ( injector : Injector ) {
214
213
const router = injector . get ( Router ) ;
215
- const baseHref = injector . get ( APP_BASE_HREF , '' ) ;
216
214
const useHash = location . href . includes ( '#' ) ;
217
215
218
216
if ( ! router ) {
219
217
console . warn ( 'No router to connect found' ) ;
220
218
return ;
221
219
}
222
220
223
- connectRouter ( router , useHash , baseHref ) ;
221
+ connectRouter ( router , useHash ) ;
224
222
}
Original file line number Diff line number Diff line change @@ -20,17 +20,10 @@ export function endsWith(prefix: string): UrlMatcher {
20
20
} ;
21
21
}
22
22
23
- export function connectRouter (
24
- router : Router ,
25
- useHash = false ,
26
- baseHref ?: string
27
- ) : void {
23
+ export function connectRouter ( router : Router , useHash = false ) : void {
28
24
let url : string ;
29
25
if ( ! useHash ) {
30
26
url = `${ location . pathname . substring ( 1 ) } ${ location . search } ` ;
31
- if ( baseHref && url . startsWith ( baseHref ) ) {
32
- url = url . replace ( baseHref , '' ) ;
33
- }
34
27
router . navigateByUrl ( url ) ;
35
28
window . addEventListener ( 'popstate' , ( ) => {
36
29
router . navigateByUrl ( url ) ;
You can’t perform that action at this time.
0 commit comments