refactor(router): reuse existing segmentes when constructing new route trees

This commit is contained in:
vsavkin
2016-05-04 14:43:24 -07:00
parent b8136cc26e
commit abfb522f83
5 changed files with 94 additions and 79 deletions

View File

@ -3,7 +3,6 @@ import {isBlank, isPresent, isString, isStringMap} from './facade/lang';
import {BaseException} from './facade/exceptions';
import {ListWrapper, StringMapWrapper} from './facade/collection';
// TODO: vsavkin: should reuse segments
export function link(segment: RouteSegment, routeTree: RouteTree, urlTree: UrlTree, commands: any[]): UrlTree {
if (commands.length === 0) return urlTree;