diff --git a/modules/@angular/router/src/directives/router_link.ts b/modules/@angular/router/src/directives/router_link.ts index 3b0c87618d..4ac86215a1 100644 --- a/modules/@angular/router/src/directives/router_link.ts +++ b/modules/@angular/router/src/directives/router_link.ts @@ -56,7 +56,6 @@ import {UrlTree} from '../url_tree'; */ @Directive({selector: ':not(a)[routerLink]'}) export class RouterLink { - @Input() target: string; private commands: any[] = []; @Input() queryParams: {[k: string]: any}; @Input() fragment: string; @@ -73,7 +72,7 @@ export class RouterLink { @Input() set routerLink(data: any[]|string) { if (Array.isArray(data)) { - this.commands = data; + this.commands = data; } else { this.commands = [data]; } @@ -85,10 +84,6 @@ export class RouterLink { return true; } - if (typeof this.target === 'string' && this.target != '_self') { - return true; - } - this.router.navigate( this.commands, {relativeTo: this.route, queryParams: this.queryParams, fragment: this.fragment}); @@ -122,7 +117,7 @@ export class RouterLinkWithHref implements OnChanges { @Input() set routerLink(data: any[]|string) { if (Array.isArray(data)) { - this.commands = data; + this.commands = data; } else { this.commands = [data]; } diff --git a/modules/@angular/router/src/router.ts b/modules/@angular/router/src/router.ts index 6f16a6cea8..b314711bc0 100644 --- a/modules/@angular/router/src/router.ts +++ b/modules/@angular/router/src/router.ts @@ -125,7 +125,7 @@ export class Router { private config: RouterConfig; /** - * @internal + * Creates the router service. */ constructor( private rootComponentType: Type, private resolver: ComponentResolver, diff --git a/tools/public_api_guard/router/index.d.ts b/tools/public_api_guard/router/index.d.ts index 3c9a64ce91..50169ab660 100644 --- a/tools/public_api_guard/router/index.d.ts +++ b/tools/public_api_guard/router/index.d.ts @@ -114,6 +114,7 @@ export declare class Router { events: Observable; routerState: RouterState; url: string; + constructor(rootComponentType: Type, resolver: ComponentResolver, urlSerializer: UrlSerializer, outletMap: RouterOutletMap, location: Location, injector: Injector, config: RouterConfig); createUrlTree(commands: any[], {relativeTo, queryParams, fragment}?: NavigationExtras): UrlTree; navigate(commands: any[], extras?: NavigationExtras): Promise; navigateByUrl(url: string | UrlTree): Promise;