This reverts commit 3327bd8eab0cf5bfb9a6a21d6ee4a8e081aab630. PR Close #30320
This commit is contained in:
		
							parent
							
								
									2a0f497e94
								
							
						
					
					
						commit
						8ced321bb6
					
				| @ -556,7 +556,6 @@ export class Router { | ||||
|                      * way the next navigation will be coming from the current URL in the browser. | ||||
|                      */ | ||||
|                     this.rawUrlTree = t.rawUrl; | ||||
|                     this.browserUrlTree = t.urlAfterRedirects; | ||||
|                     t.resolve(null); | ||||
|                     return EMPTY; | ||||
|                   } | ||||
|  | ||||
| @ -662,33 +662,6 @@ describe('Integration', () => { | ||||
|          expect(location.path()).toEqual('/login'); | ||||
|        }))); | ||||
| 
 | ||||
|     it('should set browserUrlTree with urlUpdateStrategy="eagar" and false `shouldProcessUrl`', | ||||
|        fakeAsync(inject([Router, Location], (router: Router, location: Location) => { | ||||
|          const fixture = TestBed.createComponent(RootCmp); | ||||
|          advance(fixture); | ||||
| 
 | ||||
|          router.urlUpdateStrategy = 'eager'; | ||||
| 
 | ||||
|          router.resetConfig([ | ||||
|            {path: 'team/:id', component: SimpleCmp}, | ||||
|            {path: 'login', component: AbsoluteSimpleLinkCmp} | ||||
|          ]); | ||||
| 
 | ||||
|          router.navigateByUrl('/team/22'); | ||||
|          advance(fixture, 1); | ||||
| 
 | ||||
|          expect((router as any).browserUrlTree.toString()).toBe('/team/22'); | ||||
| 
 | ||||
|          // Force to not process URL changes
 | ||||
|          router.urlHandlingStrategy.shouldProcessUrl = (url: UrlTree) => false; | ||||
| 
 | ||||
|          router.navigateByUrl('/login'); | ||||
|          advance(fixture, 1); | ||||
| 
 | ||||
|          // Because we now can't process any URL, we will end up back at the root.
 | ||||
|          expect((router as any).browserUrlTree.toString()).toBe('/'); | ||||
|        }))); | ||||
| 
 | ||||
|     it('should eagerly update URL after redirects are applied with urlUpdateStrategy="eagar"', | ||||
|        fakeAsync(inject([Router, Location], (router: Router, location: Location) => { | ||||
|          const fixture = TestBed.createComponent(RootCmp); | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user