angular-docs-cn/modules/@angular/router/test
vsavkin 23ee29b6a2 fix(router): navigation should not preserve query params and fragment by default
BREAKING CHANGE

Previously both imperative (router.navigate) and declarative (routerLink) navigations
would preserve the current query params and fragment. This behavior turned out to
be confusing. This commit changes it.

Now, neither is preserved by default. To preserve them, you need to do the following:

router.naviage("newUrl", {preserveQueryParams: true, preserveFragment: true})

<a routerLink="newUrl" preserveQueryParams preserveFragment></a>
2016-07-20 14:30:04 -07:00
..
utils chore(router): clang-format 2016-06-21 12:17:30 -07:00
apply_redirects.spec.ts fix(router): lazily-loaded modules should use loaded injectors instead of the root one 2016-07-13 18:25:30 -07:00
config.spec.ts feat(Router): add extra validation for when route was passed as Array (#9942) 2016-07-14 08:28:31 -07:00
create_router_state.spec.ts refactor(router): clean up naming 2016-07-06 16:19:52 -07:00
create_url_tree.spec.ts fix(router): navigation should not preserve query params and fragment by default 2016-07-20 14:30:04 -07:00
recognize.spec.ts fix(router): handle lastPathIndex of empty-path routes 2016-07-18 17:42:04 -07:00
resolve.spec.ts refactor(router): clean up naming 2016-07-06 16:19:52 -07:00
router.spec.ts fix(router): navigation should not preserve query params and fragment by default 2016-07-20 14:30:04 -07:00
url_serializer.spec.ts fix(router): encode/decode params and path segments 2016-07-07 17:33:42 -07:00
url_tree.spec.ts fix(router): fix RouterLinkActive to handle the case when the link has extra paths 2016-06-30 09:26:57 -07:00