我正在处理角度rc1并尝试扩展RouterOutlet,正如已解答here,
load(factory, providers, outletMap: RouterOutletMap): any {
super.load(factory, providers, outletMap);
let currentUrl = (<Location>location).pathname;
if (currentUrl == "/someUrl"){
//do something with it
}
return this.loadedComponent;
}
我可以获得当前的网址,但我需要有目标。我怎么能得到它?