revert: refactor(router): don't run the change detection every time an outlet is activated

This reverts commit 198edb3109.
This commit is contained in:
Matias Niemelä
2017-05-18 11:28:39 -07:00
parent 6531806996
commit a0a6029915
11 changed files with 232 additions and 299 deletions

View File

@ -8,7 +8,6 @@
import {ComponentRef} from '@angular/core';
import {OutletContext} from './router_outlet_context';
import {ActivatedRoute, ActivatedRouteSnapshot} from './router_state';
import {TreeNode} from './utils/tree';
@ -24,7 +23,6 @@ export type DetachedRouteHandle = {};
/** @internal */
export type DetachedRouteHandleInternal = {
contexts: Map<string, OutletContext>,
componentRef: ComponentRef<any>,
route: TreeNode<ActivatedRoute>,
};
@ -38,11 +36,7 @@ export abstract class RouteReuseStrategy {
/** Determines if this route (and its subtree) should be detached to be reused later */
abstract shouldDetach(route: ActivatedRouteSnapshot): boolean;
/**
* Stores the detached route.
*
* Storing a `null` value should erase the previously stored value.
*/
/** Stores the detached route */
abstract store(route: ActivatedRouteSnapshot, handle: DetachedRouteHandle|null): void;
/** Determines if this route (and its subtree) should be reattached */