fix(aio): intercept all clicks on anchors

Previously we had the `LinkDirective` which intercepted clicks on anchors
outside the doc viewer. Now we intercept "all" link clicks within the app.
This commit is contained in:
Peter Bacon Darwin
2017-03-13 21:06:15 +00:00
committed by Chuck Jazdzewski
parent 3f7cfde476
commit eaa04354d5
8 changed files with 191 additions and 139 deletions

View File

@ -5,6 +5,9 @@ export class MockLocationService {
currentUrl = this.urlSubject.asObservable();
search = jasmine.createSpy('search').and.returnValue({});
setSearch = jasmine.createSpy('setSearch');
go = jasmine.createSpy('Location.go');
handleAnchorClick = jasmine.createSpy('Location.handleAnchorClick')
.and.returnValue(false); // prevent click from causing a browser navigation
constructor(private initialUrl) {}
}