feat(aio): add LocationService.path() method (#16139)
This enables things like embedded components easy access to a clean version of the current location path.
This commit is contained in:

committed by
Miško Hevery

parent
5461182e25
commit
6ed812ff75
@ -7,6 +7,8 @@ export class MockLocationService {
|
||||
setSearch = jasmine.createSpy('setSearch');
|
||||
go = jasmine.createSpy('Location.go').and
|
||||
.callFake((url: string) => this.urlSubject.next(url));
|
||||
path = jasmine.createSpy('Location.path').and
|
||||
.callFake(() => this.urlSubject.getValue().split('?')[0]);
|
||||
handleAnchorClick = jasmine.createSpy('Location.handleAnchorClick')
|
||||
.and.returnValue(false); // prevent click from causing a browser navigation
|
||||
|
||||
|
Reference in New Issue
Block a user