upgrade.d.ts 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /**
  2. * @license Angular v8.1.0
  3. * (c) 2010-2019 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. * @description
  11. *
  12. * Creates an initializer that in addition to setting up the Angular
  13. * router sets up the ngRoute integration.
  14. *
  15. * ```
  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. * ```
  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. * @description
  40. *
  41. * Sets up a location synchronization.
  42. *
  43. * History.pushState does not fire onPopState, so the Angular location
  44. * doesn't detect it. The workaround is to attach a location change listener
  45. *
  46. * @publicApi
  47. */
  48. export declare function setUpLocationSync(ngUpgrade: UpgradeModule, urlType?: 'path' | 'hash'): void;
  49. export { }