-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathindex.d.ts
executable file
·61 lines (58 loc) · 1.62 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
/**
* @license Angular v20.0.0-next.7+sha-2c463a4
* (c) 2010-2025 Google LLC. https://angular.io/
* License: MIT
*/
import { InjectionToken, ComponentRef } from '@angular/core';
import { UpgradeModule } from '@angular/upgrade/static';
/**
* Creates an initializer that sets up `ngRoute` integration
* along with setting up the Angular router.
*
* @usageNotes
*
* For standalone applications:
* ```ts
* export const appConfig: ApplicationConfig = {
* providers: [RouterUpgradeInitializer],
* };
* ```
*
* For NgModule based applications:
* ```ts
* @NgModule({
* imports: [
* RouterModule.forRoot(SOME_ROUTES),
* UpgradeModule
* ],
* providers: [
* RouterUpgradeInitializer
* ]
* })
* export class AppModule {
* ngDoBootstrap() {}
* }
* ```
*
* @publicApi
*/
declare const RouterUpgradeInitializer: {
provide: InjectionToken<readonly ((compRef: ComponentRef<any>) => void)[]>;
multi: boolean;
useFactory: (ngUpgrade: UpgradeModule) => () => void;
deps: (typeof UpgradeModule)[];
};
/**
* Sets up a location change listener to trigger `history.pushState`.
* Works around the problem that `onPopState` does not trigger `history.pushState`.
* Must be called *after* calling `UpgradeModule.bootstrap`.
*
* @param ngUpgrade The upgrade NgModule.
* @param urlType The location strategy.
* @see {@link /api/common/HashLocationStrategy HashLocationStrategy}
* @see {@link /api/common/PathLocationStrategy PathLocationStrategy}
*
* @publicApi
*/
declare function setUpLocationSync(ngUpgrade: UpgradeModule, urlType?: 'path' | 'hash'): void;
export { RouterUpgradeInitializer, setUpLocationSync };