@@ -210,6 +210,9 @@ export type Data = {
210
210
[key : string | symbol ]: any ;
211
211
};
212
212
213
+ // @public
214
+ export type DebugTracingFeature = RouterFeature <RouterFeatureKind .DebugTracingFeature >;
215
+
213
216
// @public
214
217
export class DefaultTitleStrategy extends TitleStrategy {
215
218
constructor (title : Title );
@@ -234,6 +237,12 @@ export class DefaultUrlSerializer implements UrlSerializer {
234
237
// @public
235
238
export type DetachedRouteHandle = {};
236
239
240
+ // @public
241
+ export type DisabledInitialNavigationFeature = RouterFeature <RouterFeatureKind .DisabledInitialNavigationFeature >;
242
+
243
+ // @public
244
+ export type EnabledBlockingInitialNavigationFeature = RouterFeature <RouterFeatureKind .EnabledBlockingInitialNavigationFeature >;
245
+
237
246
// @public
238
247
type Event_2 = RouterEvent | NavigationStart | NavigationEnd | NavigationCancel | NavigationError | RoutesRecognized | GuardsCheckStart | GuardsCheckEnd | RouteConfigLoadStart | RouteConfigLoadEnd | ChildActivationStart | ChildActivationEnd | ActivationStart | ActivationEnd | Scroll | ResolveStart | ResolveEnd ;
239
248
export { Event_2 as Event }
@@ -275,21 +284,15 @@ export const enum EventType {
275
284
}
276
285
277
286
// @public
278
- export interface ExtraOptions {
279
- anchorScrolling? : ' disabled' | ' enabled' ;
280
- canceledNavigationResolution? : ' replace' | ' computed' ;
287
+ export interface ExtraOptions extends InMemoryScrollingOptions , RouterConfigOptions {
281
288
enableTracing? : boolean ;
282
289
errorHandler? : ErrorHandler ;
283
290
initialNavigation? : InitialNavigation ;
284
291
malformedUriErrorHandler? : (error : URIError , urlSerializer : UrlSerializer , url : string ) => UrlTree ;
285
- onSameUrlNavigation? : ' reload' | ' ignore' ;
286
- paramsInheritanceStrategy? : ' emptyOnly' | ' always' ;
287
292
preloadingStrategy? : any ;
288
293
// @deprecated
289
294
relativeLinkResolution? : ' legacy' | ' corrected' ;
290
295
scrollOffset? : [number , number ] | (() => [number , number ]);
291
- scrollPositionRestoration? : ' disabled' | ' enabled' | ' top' ;
292
- urlUpdateStrategy? : ' deferred' | ' eager' ;
293
296
useHash? : boolean ;
294
297
}
295
298
@@ -333,6 +336,18 @@ export class GuardsCheckStart extends RouterEvent {
333
336
// @public
334
337
export type InitialNavigation = ' disabled' | ' enabledBlocking' | ' enabledNonBlocking' ;
335
338
339
+ // @public
340
+ export type InitialNavigationFeature = EnabledBlockingInitialNavigationFeature | DisabledInitialNavigationFeature ;
341
+
342
+ // @public
343
+ export type InMemoryScrollingFeature = RouterFeature <RouterFeatureKind .InMemoryScrollingFeature >;
344
+
345
+ // @public
346
+ export interface InMemoryScrollingOptions {
347
+ anchorScrolling? : ' disabled' | ' enabled' ;
348
+ scrollPositionRestoration? : ' disabled' | ' enabled' | ' top' ;
349
+ }
350
+
336
351
// @public
337
352
export interface IsActiveMatchOptions {
338
353
fragment: ' exact' | ' ignored' ;
@@ -494,6 +509,9 @@ export class PreloadAllModules implements PreloadingStrategy {
494
509
static ɵprov: i0 .ɵɵInjectableDeclaration <PreloadAllModules >;
495
510
}
496
511
512
+ // @public
513
+ export type PreloadingFeature = RouterFeature <RouterFeatureKind .PreloadingFeature >;
514
+
497
515
// @public
498
516
export abstract class PreloadingStrategy {
499
517
// (undocumented)
@@ -503,6 +521,9 @@ export abstract class PreloadingStrategy {
503
521
// @public
504
522
export const PRIMARY_OUTLET = " primary" ;
505
523
524
+ // @public
525
+ export function provideRouter(routes : Routes , ... features : RouterFeatures []): Provider [];
526
+
506
527
// @public
507
528
export function provideRoutes(routes : Routes ): Provider [];
508
529
@@ -651,6 +672,17 @@ export const ROUTER_CONFIGURATION: InjectionToken<ExtraOptions>;
651
672
// @public
652
673
export const ROUTER_INITIALIZER: InjectionToken <(compRef : ComponentRef <any >) => void >;
653
674
675
+ // @public
676
+ export interface RouterConfigOptions {
677
+ canceledNavigationResolution? : ' replace' | ' computed' ;
678
+ onSameUrlNavigation? : ' reload' | ' ignore' ;
679
+ paramsInheritanceStrategy? : ' emptyOnly' | ' always' ;
680
+ urlUpdateStrategy? : ' deferred' | ' eager' ;
681
+ }
682
+
683
+ // @public
684
+ export type RouterConfigurationFeature = RouterFeature <RouterFeatureKind .RouterConfigurationFeature >;
685
+
654
686
// @public
655
687
export abstract class RouteReuseStrategy {
656
688
abstract retrieve(route : ActivatedRouteSnapshot ): DetachedRouteHandle | null ;
@@ -669,6 +701,17 @@ export class RouterEvent {
669
701
url: string ;
670
702
}
671
703
704
+ // @public
705
+ export interface RouterFeature <FeatureKind extends RouterFeatureKind > {
706
+ // (undocumented)
707
+ ɵkind: FeatureKind ;
708
+ // (undocumented)
709
+ ɵproviders: Provider [];
710
+ }
711
+
712
+ // @public
713
+ export type RouterFeatures = PreloadingFeature | DebugTracingFeature | InitialNavigationFeature | InMemoryScrollingFeature | RouterConfigurationFeature ;
714
+
672
715
// @public
673
716
export class RouterLink implements OnChanges {
674
717
constructor (router : Router , route : ActivatedRoute , tabIndexAttribute : string | null | undefined , renderer : Renderer2 , el : ElementRef );
@@ -1002,6 +1045,24 @@ export class UrlTree {
1002
1045
// @public (undocumented)
1003
1046
export const VERSION: Version ;
1004
1047
1048
+ // @public
1049
+ export function withDebugTracing(): DebugTracingFeature ;
1050
+
1051
+ // @public
1052
+ export function withDisabledInitialNavigation(): DisabledInitialNavigationFeature ;
1053
+
1054
+ // @public
1055
+ export function withEnabledBlockingInitialNavigation(): EnabledBlockingInitialNavigationFeature ;
1056
+
1057
+ // @public
1058
+ export function withInMemoryScrolling(options ? : InMemoryScrollingOptions ): InMemoryScrollingFeature ;
1059
+
1060
+ // @public
1061
+ export function withPreloading(preloadingStrategy : Type <PreloadingStrategy >): PreloadingFeature ;
1062
+
1063
+ // @public
1064
+ export function withRouterConfig(options : RouterConfigOptions ): RouterConfigurationFeature ;
1065
+
1005
1066
// (No @packageDocumentation comment for this package)
1006
1067
1007
1068
```
0 commit comments