feat(core): add a component resolver that can load components lazily using system.js

This commit is contained in:
vsavkin
2016-05-04 10:45:48 -07:00
parent 0f1465b899
commit 1a0aea67a0
5 changed files with 26 additions and 1 deletions

View File

@ -11,7 +11,7 @@ import {reflector} from '@angular/core';
// TODO: vsavkin: recognize should take the old tree and merge it
export function recognize(componentResolver: ComponentResolver, rootComponent: Type,
url: UrlTree): Promise<RouteTree> {
let matched = new _MatchResult(rootComponent, [url.root], null, rootNode(url).children, []);
let matched = new _MatchResult(rootComponent, [url.root], {}, rootNode(url).children, []);
return _constructSegment(componentResolver, matched).then(roots => new RouteTree(roots[0]));
}