index.d.ts 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /**
  2. * @license Angular v16.0.4
  3. * (c) 2010-2022 Google LLC. https://angular.io/
  4. * License: MIT
  5. */
  6. import { ComponentRef } from '@angular/core';
  7. import { InjectionToken } from '@angular/core';
  8. import { UpgradeModule } from '@angular/upgrade/static';
  9. /**
  10. * Creates an initializer that sets up `ngRoute` integration
  11. * along with setting up the Angular router.
  12. *
  13. * @usageNotes
  14. *
  15. * <code-example language="typescript">
  16. * @NgModule({
  17. * imports: [
  18. * RouterModule.forRoot(SOME_ROUTES),
  19. * UpgradeModule
  20. * ],
  21. * providers: [
  22. * RouterUpgradeInitializer
  23. * ]
  24. * })
  25. * export class AppModule {
  26. * ngDoBootstrap() {}
  27. * }
  28. * </code-example>
  29. *
  30. * @publicApi
  31. */
  32. export declare const RouterUpgradeInitializer: {
  33. provide: InjectionToken<((compRef: ComponentRef<any>) => void)[]>;
  34. multi: boolean;
  35. useFactory: (ngUpgrade: UpgradeModule) => () => void;
  36. deps: (typeof UpgradeModule)[];
  37. };
  38. /**
  39. * Sets up a location change listener to trigger `history.pushState`.
  40. * Works around the problem that `onPopState` does not trigger `history.pushState`.
  41. * Must be called *after* calling `UpgradeModule.bootstrap`.
  42. *
  43. * @param ngUpgrade The upgrade NgModule.
  44. * @param urlType The location strategy.
  45. * @see `HashLocationStrategy`
  46. * @see `PathLocationStrategy`
  47. *
  48. * @publicApi
  49. */
  50. export declare function setUpLocationSync(ngUpgrade: UpgradeModule, urlType?: 'path' | 'hash'): void;
  51. export { }