angular-docs-cn/packages/router/src
Andrew Scott a82fddf1ce feat(router): Allow for custom router outlet implementations (#40827)
This PR formalizes, documents, and makes public the router outlet contract.

The set of `RouterOutlet` methods used by the `Router` has not changed
in over 4 years, since the introduction of route reuse strategies.

Creation of custom router outlets is already possible and is used by the
Ionic framework
(https://github.com/ionic-team/ionic-framework/blob/master/angular/src/directives/navigation/ion-router-outlet.ts).
There is a small "hack" that is needed to make this work, which is that
outlets must register with `ChildrenOutletContexts`, but it currently
only accepts our `RouterOutlet`.

By exposing the interface the `Router` uses to activate and deactivate
routes through outlets, we allow for developers to more easily and safely
extend the `Router` and have fine-tuned control over navigation and component
activation that fits project requirements.

PR Close #40827
2021-02-19 09:13:17 -08:00
..
components build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
directives feat(router): Allow for custom router outlet implementations (#40827) 2021-02-19 09:13:17 -08:00
operators refactor(router): refactor and simplify router RxJS chains (#40290) 2021-01-11 15:30:55 -08:00
utils fix(router): Fix occasional error when creating url tree in IE 11 and Edge (#40488) 2021-01-21 12:25:16 -08:00
apply_redirects.ts fix(router): fix load interaction of navigation and preload strategies (#40389) 2021-02-16 11:28:50 -08:00
config.ts fix(router): fix load interaction of navigation and preload strategies (#40389) 2021-02-16 11:28:50 -08:00
create_router_state.ts fix(router): Fix arguments order for call to shouldReuseRoute (#26949) 2020-09-15 11:33:52 -07:00
create_url_tree.ts fix(router): always stringify matrix parameters (#25095) 2021-01-20 16:19:45 -08:00
events.ts docs: remove duplicated the (#40434) 2021-01-14 11:33:57 -08:00
index.ts feat(router): Allow for custom router outlet implementations (#40827) 2021-02-19 09:13:17 -08:00
interfaces.ts docs: update reference doc for router guards and resolvers (#38079) 2020-07-15 12:32:10 -07:00
private_export.ts fix(router): properly assign ExtraOptions to Router in RouterTestingModule (#39096) 2020-10-05 16:35:14 -07:00
recognize.ts fix(router): apply redirects should match named outlets with empty path parents (#40029) 2021-01-05 12:43:47 -08:00
route_reuse_strategy.ts fix(router): export DefaultRouteReuseStrategy to Router public_api (#31575) 2020-08-13 16:02:41 -07:00
router.ts fix(router): stop emitting to event observable on destroy (#40638) 2021-02-04 10:46:46 -08:00
router_config_loader.ts fix(router): fix load interaction of navigation and preload strategies (#40389) 2021-02-16 11:28:50 -08:00
router_module.ts docs(router): clarify the description of legacy relativeLinkResolution (#40384) 2021-01-11 14:09:40 -08:00
router_outlet_context.ts feat(router): Allow for custom router outlet implementations (#40827) 2021-02-19 09:13:17 -08:00
router_preloader.ts fix(router): fix load interaction of navigation and preload strategies (#40389) 2021-02-16 11:28:50 -08:00
router_scroller.ts refactor(router): Add annotations to correct Router documentation (#38448) 2020-08-13 11:36:10 -07:00
router_state.ts docs(router): Clearly document how to retrieve all params in the router tree (#40306) 2021-01-08 11:47:47 -08:00
shared.ts fix(router): fix error when calling ParamMap.get function (#31599) 2020-06-25 11:57:24 -07:00
url_handling_strategy.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
url_tree.ts fix(router): always stringify matrix parameters (#25095) 2021-01-20 16:19:45 -08:00
version.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00