refactor: move all utility functions into the utils dir
This commit is contained in:
@ -1,11 +1,10 @@
|
||||
import { UrlTree, UrlSegment, equalUrlSegments } from './url_tree';
|
||||
import { shallowEqual, flatten, first, merge } from './util';
|
||||
import { TreeNode, rootNode } from './tree';
|
||||
import { shallowEqual, flatten, first, merge } from './utils/collection';
|
||||
import { TreeNode, rootNode } from './utils/tree';
|
||||
import { RouterState, ActivatedRoute, Params, PRIMARY_OUTLET } from './router_state';
|
||||
import { RouterConfig, Route } from './config';
|
||||
import { ComponentResolver, ComponentFactory, Type } from '@angular/core';
|
||||
import { BehaviorSubject } from 'rxjs/BehaviorSubject';
|
||||
import { Observer } from 'rxjs/Observer';
|
||||
|
||||
export function recognize(componentResolver: ComponentResolver, config: RouterConfig,
|
||||
url: UrlTree, existingState: RouterState): Promise<RouterState> {
|
||||
|
@ -3,12 +3,12 @@ import { Location } from '@angular/common';
|
||||
import { UrlSerializer } from './url_serializer';
|
||||
import { RouterOutletMap } from './router_outlet_map';
|
||||
import { recognize } from './recognize';
|
||||
import { rootNode, TreeNode } from './tree';
|
||||
import { rootNode, TreeNode } from './utils/tree';
|
||||
import { UrlTree } from './url_tree';
|
||||
import { createEmptyState, RouterState, ActivatedRoute, PRIMARY_OUTLET } from './router_state';
|
||||
import { RouterConfig } from './config';
|
||||
import { RouterOutlet } from './directives/router_outlet';
|
||||
import { forEach } from './util';
|
||||
import { forEach } from './utils/collection';
|
||||
import { Subscription } from 'rxjs/Subscription';
|
||||
|
||||
/**
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { Tree, TreeNode } from './tree';
|
||||
import { Tree, TreeNode } from './utils/tree';
|
||||
import { UrlSegment } from './url_tree';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
import { BehaviorSubject } from 'rxjs/BehaviorSubject';
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { UrlTree, UrlSegment } from './url_tree';
|
||||
import { rootNode, TreeNode } from './tree';
|
||||
import { rootNode, TreeNode } from './utils/tree';
|
||||
|
||||
/**
|
||||
* Defines a way to serialize/deserialize a url tree.
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Tree, TreeNode } from './tree';
|
||||
import { shallowEqual } from './util';
|
||||
import { Tree, TreeNode } from './utils/tree';
|
||||
import { shallowEqual } from './utils/collection';
|
||||
|
||||
/**
|
||||
* A URL in the tree form.
|
||||
|
Reference in New Issue
Block a user