diff --git a/modules/@angular/router/index.ts b/modules/@angular/router/index.ts index 4e068bac81..c51e9c7102 100644 --- a/modules/@angular/router/index.ts +++ b/modules/@angular/router/index.ts @@ -19,9 +19,12 @@ export {provideRouter} from './src/router_providers'; export {ActivatedRoute, ActivatedRouteSnapshot, RouterState, RouterStateSnapshot} from './src/router_state'; export {PRIMARY_OUTLET, Params} from './src/shared'; export {DefaultUrlSerializer, UrlPathWithParams, UrlSerializer, UrlTree} from './src/url_tree'; +export {RouterLink, RouterLinkWithHref} from './src/directives/router_link'; +export {RouterLinkActive} from './src/directives/router_link_active'; +export {RouterOutlet} from './src/directives/router_outlet'; /** - * @experimental + * @stable */ export const ROUTER_DIRECTIVES = [RouterOutlet, RouterLink, RouterLinkWithHref, RouterLinkActive]; diff --git a/tools/public_api_guard/router/index.d.ts b/tools/public_api_guard/router/index.d.ts index 50169ab660..c8472d88d0 100644 --- a/tools/public_api_guard/router/index.d.ts +++ b/tools/public_api_guard/router/index.d.ts @@ -123,12 +123,55 @@ export declare class Router { serializeUrl(url: UrlTree): string; } -/** @experimental */ +/** @stable */ export declare const ROUTER_DIRECTIVES: (typeof RouterOutlet | typeof RouterLink | typeof RouterLinkWithHref | typeof RouterLinkActive)[]; /** @stable */ export declare type RouterConfig = Route[]; +/** @stable */ +export declare class RouterLink { + fragment: string; + queryParams: { + [k: string]: any; + }; + routerLink: any[] | string; + urlTree: UrlTree; + onClick(button: number, ctrlKey: boolean, metaKey: boolean): boolean; +} + +/** @stable */ +export declare class RouterLinkActive implements OnChanges, OnDestroy, AfterContentInit { + routerLinkActive: string[] | string; + ngAfterContentInit(): void; + ngOnChanges(changes: {}): any; + ngOnDestroy(): any; +} + +/** @stable */ +export declare class RouterLinkWithHref implements OnChanges { + fragment: string; + href: string; + queryParams: { + [k: string]: any; + }; + routerLink: any[] | string; + target: string; + urlTree: UrlTree; + ngOnChanges(changes: {}): any; + onClick(button: number, ctrlKey: boolean, metaKey: boolean): boolean; +} + +/** @stable */ +export declare class RouterOutlet { + activatedRoute: ActivatedRoute; + component: Object; + isActivated: boolean; + outletMap: RouterOutletMap; + activate(activatedRoute: ActivatedRoute, providers: ResolvedReflectiveProvider[], outletMap: RouterOutletMap): void; + deactivate(): void; +} + /** @stable */ export declare class RouterOutletMap { registerOutlet(name: string, outlet: RouterOutlet): void;