mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
refactor(docs-infra): enable tslint rules for the angular.io app (#39307)
Signed-off-by: Tasos Alexiou <tasos@arrikto.com> PR Close #39307
This commit is contained in:
committed by
Joey Perrott
parent
c53bae839d
commit
356a256909
@@ -5,7 +5,7 @@ export class MockLocationService {
|
||||
urlSubject = new BehaviorSubject<string>(this.initialUrl);
|
||||
currentUrl = this.urlSubject.asObservable().pipe(map(url => this.stripSlashes(url)));
|
||||
// strip off query and hash
|
||||
currentPath = this.currentUrl.pipe(map(url => url.match(/[^?#]*/)![0]));
|
||||
currentPath = this.currentUrl.pipe(map(url => url.match(/[^?#]*/)?.[0] || ''));
|
||||
search = jasmine.createSpy('search').and.returnValue({});
|
||||
setSearch = jasmine.createSpy('setSearch');
|
||||
fullPageNavigationNeeded = jasmine.createSpy('Location.fullPageNavigationNeeded');
|
||||
@@ -23,4 +23,3 @@ export class MockLocationService {
|
||||
return url.replace(/^\/+/, '').replace(/\/+(\?|#|$)/, '$1');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user