5 Commits

Author SHA1 Message Date
Peter Bacon Darwin
7b6dbf0952 fix(aio): LocationService search should handle corner cases
Adds tests and fixes corners cases for both `search()` and `setSearc()`
for things like empty queries and param keys that need encoding.

This commit refactors the `LocationService` to rely upon the `PlatformLocation`
rather than using `window.history` directly. This makes testing easier but also
makes the code simpler since `PlatformLocation` deals with platforms that
do not support history for us.
2017-03-13 16:52:58 -07:00
Ward Bell
5ad5301a3e feat(aio): add API list page (#14899) 2017-03-08 13:08:19 -08:00
Peter Bacon Darwin
fe962f6de7 fix(aio): LocationService urls should never start with a slash
There is a weirdness in the Angular Location service.
If the `baseHref` is only a single slash (`'/'`) then it
changes it to be an empty string (`''`). The effect of this
is that `Location.normaliseUrl(url)` does not strip off the
leading slash from url paths.

The problem is that the leading slash only appears on the
initial Location path, and not on urls that arrive from subscribing
to the Location service.

This commit is a workaround this problem.
2017-03-06 22:27:32 -08:00
Peter Bacon Darwin
2ebfa2ff31 test(aio): add placeholder test descriptions 2017-03-05 08:41:26 -08:00
Peter Bacon Darwin
887d32a9bf feat(aio): add location service 2017-03-02 00:21:06 -08:00