cleanup(router): add @internal to constructors where needed
This commit is contained in:
@ -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
|
||||
|
@ -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, []);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user