From 81d27daf0debcab528f60848b83b17c180315402 Mon Sep 17 00:00:00 2001 From: vsavkin Date: Thu, 28 Jul 2016 14:36:05 -0700 Subject: [PATCH] fix(router): update dts files --- modules/@angular/router/src/router_module.ts | 6 ++++-- tools/public_api_guard/router/index.d.ts | 14 +++++++++++++- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/modules/@angular/router/src/router_module.ts b/modules/@angular/router/src/router_module.ts index 5bc03a4643..8216984384 100644 --- a/modules/@angular/router/src/router_module.ts +++ b/modules/@angular/router/src/router_module.ts @@ -7,7 +7,7 @@ */ import {APP_BASE_HREF, HashLocationStrategy, Location, LocationStrategy, PathLocationStrategy, PlatformLocation} from '@angular/common'; -import {ApplicationRef, ComponentResolver, Injector, ModuleWithProviders, NgModule, NgModuleFactoryLoader, OpaqueToken, SystemJsNgModuleLoader} from '@angular/core'; +import {ApplicationRef, ComponentResolver, Inject, Injector, ModuleWithProviders, NgModule, NgModuleFactoryLoader, OpaqueToken, Optional, SystemJsNgModuleLoader} from '@angular/core'; import {ExtraOptions, ROUTER_CONFIGURATION, provideRouterConfig, provideRoutes, rootRoute, setupRouter} from './common_router_providers'; import {Routes} from './config'; @@ -98,7 +98,9 @@ export class RouterModule { { provide: LocationStrategy, useFactory: provideLocationStrategy, - deps: [PlatformLocation, APP_BASE_HREF, ROUTER_CONFIGURATION] + deps: [ + PlatformLocation, [new Inject(APP_BASE_HREF), new Optional()], ROUTER_CONFIGURATION + ] } ] }; diff --git a/tools/public_api_guard/router/index.d.ts b/tools/public_api_guard/router/index.d.ts index 7fc9a46ea4..17b670246d 100644 --- a/tools/public_api_guard/router/index.d.ts +++ b/tools/public_api_guard/router/index.d.ts @@ -131,9 +131,21 @@ export declare type ResolveData = { /** @stable */ export interface Route { + canActivate?: any[]; + canActivateChild?: any[]; + canDeactivate?: any[]; + canLoad?: any[]; + children?: Route[]; + component?: Type | string; + data?: Data; + loadChildren?: string; + outlet?: string; path?: string; - pathMatch?: + pathMatch?: string; + redirectTo?: string; + resolve?: ResolveData; /** @deprecated */ terminal?: boolean; +} /** @stable */ export declare class Router {