angular/aio/src/app/shared
George Kalpakas 4dd107d18c fix(docs-infra): correctly handle in-page anchor links (#43460)
Previously, anchor links that were supposed to point to fragments inside
the current page (e.g. `href="#something"`) would end up navigating to
the homepage (`/`). This was due to them being resolved relative to the
base URL, which is set to `/` (via `<base href="/">`). See also
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/base#in-page_anchors.

This commit fixes this issue by handling such links specially in
`LocationService#handleAnchorClick()` and prepending the current path to
the URL.

This will also be useful for implementing a "skip to content" link as
described in #42936.

PR Close #43460
2021-09-21 16:12:39 +00:00
..
search-results refactor(docs-infra): introduce max-len 120 eslint rule (#43439) 2021-09-15 10:47:35 -07:00
select refactor(docs-infra): migrate aio from tslint to eslint (#42820) 2021-07-20 11:55:28 -07:00
theme-picker refactor(docs-infra): provide local-/sessionStorage via DI (#42259) 2021-06-14 09:54:08 -07:00
attribute-utils.spec.ts refactor(docs-infra): migrate aio from tslint to eslint (#42820) 2021-07-20 11:55:28 -07:00
attribute-utils.ts refactor(docs-infra): migrate aio from tslint to eslint (#42820) 2021-07-20 11:55:28 -07:00
current-date.ts feat(aio): implement survey notification link (#21371) 2018-01-12 10:05:13 -08:00
custom-icon-registry.spec.ts fix(docs-infra): make custom icon registry compatible with Trusted Types (#42800) 2021-09-09 11:16:59 -07:00
custom-icon-registry.ts fix(docs-infra): make custom icon registry compatible with Trusted Types (#42800) 2021-09-09 11:16:59 -07:00
deployment.service.spec.ts test(docs-infra): remove deprecated ReflectiveInjector (#38408) 2020-08-13 12:56:13 -07:00
deployment.service.ts build(docs-infra): remove the no-string-literal tslint rule to align with CLI (#39018) 2020-10-01 09:32:57 -07:00
ga.service.spec.ts test(docs-infra): remove deprecated ReflectiveInjector (#38408) 2020-08-13 12:56:13 -07:00
ga.service.ts build(docs-infra): remove the no-string-literal tslint rule to align with CLI (#39018) 2020-10-01 09:32:57 -07:00
location.service.spec.ts fix(docs-infra): correctly handle in-page anchor links (#43460) 2021-09-21 16:12:39 +00:00
location.service.ts fix(docs-infra): correctly handle in-page anchor links (#43460) 2021-09-21 16:12:39 +00:00
logger.service.spec.ts test(docs-infra): remove deprecated ReflectiveInjector (#38408) 2020-08-13 12:56:13 -07:00
logger.service.ts fix(aio): constrain error logging to improve reporting (#22713) 2018-03-14 10:52:11 -07:00
reporting-error-handler.spec.ts fix(docs-infra): correctly handle reported errors (#42883) 2021-07-19 17:35:02 -07:00
reporting-error-handler.ts refactor(docs-infra): migrate aio from tslint to eslint (#42820) 2021-07-20 11:55:28 -07:00
scroll-spy.service.spec.ts refactor(docs-infra): introduce max-len 120 eslint rule (#43439) 2021-09-15 10:47:35 -07:00
scroll-spy.service.ts refactor(docs-infra): make angular.io and docs examples compatible with RxJS v7 (#42660) 2021-06-29 10:29:58 -07:00
scroll.service.spec.ts fix(docs-infra): focus elements when scrolling to them (if focusable) (#43460) 2021-09-21 16:12:39 +00:00
scroll.service.ts fix(docs-infra): focus elements when scrolling to them (if focusable) (#43460) 2021-09-21 16:12:39 +00:00
security.ts fix(docs-infra): make custom icon registry compatible with Trusted Types (#42800) 2021-09-09 11:16:59 -07:00
shared.module.ts feat(docs-infra): implement dark mode (#41129) 2021-05-27 11:24:53 -07:00
storage.service.spec.ts refactor(docs-infra): provide local-/sessionStorage via DI (#42259) 2021-06-14 09:54:08 -07:00
storage.service.ts refactor(docs-infra): provide local-/sessionStorage via DI (#42259) 2021-06-14 09:54:08 -07:00
toc.service.spec.ts refactor(docs-infra): migrate aio from tslint to eslint (#42820) 2021-07-20 11:55:28 -07:00
toc.service.ts refactor(docs-infra): introduce max-len 120 eslint rule (#43439) 2021-09-15 10:47:35 -07:00
web-worker-message.ts build(docs-infra): convert search-worker.js to TypeScript (#29764) 2019-04-15 11:14:04 -07:00
web-worker.ts build(docs-infra): convert search-worker.js to TypeScript (#29764) 2019-04-15 11:14:04 -07:00
window.ts refactor(core): Migrate TestBed.get to TestBed.inject (#32382) 2019-09-09 19:10:54 -04:00