cleanup(router): add @internal to constructors where needed

This commit is contained in:
vsavkin
2016-06-02 15:18:34 -07:00
parent ab958598d7
commit f04b6978fb
4 changed files with 27 additions and 4 deletions

View File

@ -40,6 +40,9 @@ export class RouterLink {
// the url displayed on the anchor element.
@HostBinding() href: string;
/**
* @internal
*/
constructor(private router: Router, private route: ActivatedRoute) {}
@Input()
@ -51,8 +54,7 @@ export class RouterLink {
}
this.updateTargetUrlAndHref();
}
@HostListener("click")
onClick(): boolean {
// If no target, or if target is _self, prevent default browser behavior

View File

@ -7,8 +7,11 @@ export class RouterOutlet {
private activated:ComponentRef<any>|null;
public outletMap:RouterOutletMap;
/**
* @internal
*/
constructor(parentOutletMap:RouterOutletMap, private location:ViewContainerRef,
@Attribute('name') name:string, public injector: Injector) {
@Attribute('name') name:string) {
parentOutletMap.registerOutlet(name ? name : PRIMARY_OUTLET, this);
}
@ -28,7 +31,7 @@ export class RouterOutlet {
activate(factory: ComponentFactory<any>, providers: ResolvedReflectiveProvider[],
outletMap: RouterOutletMap): void {
this.outletMap = outletMap;
let inj = ReflectiveInjector.fromResolvedProviders(providers, this.location.parentInjector);
const inj = ReflectiveInjector.fromResolvedProviders(providers, this.location.parentInjector);
this.activated = this.location.createComponent(factory, this.location.length, inj, []);
}
}