angular-cn/packages
Jason Aden b7baf632c0 refactor(router): move routing into a single Observable stream (#25740)
This is a major refactor of how the router previously worked. There are a couple major advantages of this refactor, and future work will be built on top of it.

First, we will no longer have multiple navigations running at the same time. Previously, a new navigation wouldn't cause the old navigation to be cancelled and cleaned up. Instead, multiple navigations could be going at once, and we imperatively checked that we were operating on the most current `router.navigationId` as we progressed through the Observable streams. This had some major faults, the biggest of which was async races where an ongoing async action could result in a redirect once the async action completed, but there was no way to guarantee there weren't also other redirects that would be queued up by other async actions. After this refactor, there's a single Observable stream that will get cleaned up each time a new navigation is requested.

Additionally, the individual pieces of routing have been pulled out into their own operators. While this was needed in order to create one continuous stream, it also will allow future improvements to the testing APIs as things such as Guards or Resolvers should now be able to be tested in much more isolation.

* Add the new `router.transitions` observable of the new `NavigationTransition` type to contain the transition information
* Update `router.navigations` to pipe off of `router.transitions`
* Re-write navigation Observable flow to a single configured stream
* Refactor `switchMap` instead of the previous `mergeMap` to ensure new navigations cause a cancellation and cleanup of already running navigations
* Wire in existing error and cancellation logic so cancellation matches previous behavior

PR Close #25740
2018-09-27 14:02:57 -07:00
..
animations build: refactor ambient node & jasmine types so they are only included where needed (#25491) 2018-08-16 13:46:43 -07:00
bazel build: update node type version (#25862) 2018-09-18 13:06:28 -07:00
benchpress fix(benchpress): Use performance.mark() instead of console.time() (#24114) 2018-08-30 21:33:40 -07:00
common docs(common): move `KeyValuePipe` example to `@usageNotes` (#26039) 2018-09-24 09:11:02 -07:00
compiler fixup! feat(ivy): adding support for ngNonBindable attribute 2018-09-27 11:52:07 -07:00
compiler-cli fixup! feat(ivy): adding support for ngNonBindable attribute 2018-09-27 11:52:07 -07:00
core refactor(ivy): make sure that test bed symbols are imported from ivy_switch (#26121) 2018-09-27 12:06:34 -07:00
docs
elements build(bazel): update to rules_typescript 0.17.0 & rules_nodejs 0.13.4 (#25920) 2018-09-18 13:05:38 -07:00
examples fix(core): In Testability.whenStable update callback, pass more complete (#25010) 2018-08-06 13:49:19 -07:00
forms docs: more form overview edits (#25663) 2018-09-25 18:48:15 -07:00
http docs(http): move examples to `@usageNotes` (#26039) 2018-09-24 09:11:02 -07:00
language-service refactor: fix return type of `tryCall` (#25481) 2018-09-27 12:07:38 -07:00
platform-browser docs(platform-browser): move examples to `@usageNotes` (#26039) 2018-09-24 09:11:02 -07:00
platform-browser-dynamic build(bazel): update to rules_typescript 0.17.0 & rules_nodejs 0.13.4 (#25920) 2018-09-18 13:05:38 -07:00
platform-server feat(platform-server): update domino to v2.1.0 (#25564) 2018-09-19 16:07:36 -07:00
platform-webworker build(bazel): update to rules_typescript 0.17.0 & rules_nodejs 0.13.4 (#25920) 2018-09-18 13:05:38 -07:00
platform-webworker-dynamic ci(ivy): configure CI environments for Ivy JIT and AOT (#24309) 2018-06-08 13:34:27 -07:00
private/testing build: refactor ambient node & jasmine types so they are only included where needed (#25491) 2018-08-16 13:46:43 -07:00
router refactor(router): move routing into a single Observable stream (#25740) 2018-09-27 14:02:57 -07:00
service-worker fix(service-worker): do not blow up when caches are unwritable (#26042) 2018-09-24 09:53:39 -07:00
upgrade docs(upgrade): move examples etc into `@usageNotes` (#26039) 2018-09-24 09:11:02 -07:00
BUILD.bazel build: refactor ambient node & jasmine types so they are only included where needed (#25491) 2018-08-16 13:46:43 -07:00
README.md
empty.ts
es6-subset.d.ts
goog.d.ts
license-banner.txt
rollup.config.js
system.d.ts
tsconfig-build.json build(bazel): Turning on strictPropertyInitialization for Angular. (#24572) 2018-06-25 07:57:13 -07:00
tsconfig-metadata.json fix(compiler): Fix look up of entryComponents in AOT Summaries (#24892) 2018-09-11 16:23:17 -07:00
tsconfig-test.json build: refactor ambient node & jasmine types so they are only included where needed (#25491) 2018-08-16 13:46:43 -07:00
tsconfig.json fix(compiler): Fix look up of entryComponents in AOT Summaries (#24892) 2018-09-11 16:23:17 -07:00
types.d.ts build: refactor ambient node & jasmine types so they are only included where needed (#25491) 2018-08-16 13:46:43 -07:00

README.md

Angular

The sources for this package are in the main Angular repo. Please file issues and pull requests against that repo.

License: MIT