router.d.ts 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. /**
  2. * @module
  3. * @description
  4. * Maps application URLs into application states, to support deep-linking and navigation.
  5. */
  6. export { Router } from './src/router/router';
  7. export { RouterOutlet } from './src/router/router_outlet';
  8. export { RouterLink } from './src/router/router_link';
  9. export { RouteParams, RouteData } from './src/router/instruction';
  10. export { PlatformLocation } from './src/router/platform_location';
  11. export { RouteRegistry, ROUTER_PRIMARY_COMPONENT } from './src/router/route_registry';
  12. export { LocationStrategy, APP_BASE_HREF } from './src/router/location_strategy';
  13. export { HashLocationStrategy } from './src/router/hash_location_strategy';
  14. export { PathLocationStrategy } from './src/router/path_location_strategy';
  15. export { Location } from './src/router/location';
  16. export * from './src/router/route_config_decorator';
  17. export * from './src/router/route_definition';
  18. export { OnActivate, OnDeactivate, OnReuse, CanDeactivate, CanReuse } from './src/router/interfaces';
  19. export { CanActivate } from './src/router/lifecycle_annotations';
  20. export { Instruction, ComponentInstruction } from './src/router/instruction';
  21. export { OpaqueToken } from 'angular2/core';
  22. /**
  23. * A list of directives. To use the router directives like {@link RouterOutlet} and
  24. * {@link RouterLink}, add this to your `directives` array in the {@link View} decorator of your
  25. * component.
  26. *
  27. * ### Example ([live demo](http://plnkr.co/edit/iRUP8B5OUbxCWQ3AcIDm))
  28. *
  29. * ```
  30. * import {Component} from 'angular2/core';
  31. * import {ROUTER_DIRECTIVES, ROUTER_PROVIDERS, RouteConfig} from 'angular2/router';
  32. *
  33. * @Component({directives: [ROUTER_DIRECTIVES]})
  34. * @RouteConfig([
  35. * {...},
  36. * ])
  37. * class AppCmp {
  38. * // ...
  39. * }
  40. *
  41. * bootstrap(AppCmp, [ROUTER_PROVIDERS]);
  42. * ```
  43. */
  44. export declare const ROUTER_DIRECTIVES: any[];
  45. /**
  46. * A list of {@link Provider}s. To use the router, you must add this to your application.
  47. *
  48. * ### Example ([live demo](http://plnkr.co/edit/iRUP8B5OUbxCWQ3AcIDm))
  49. *
  50. * ```
  51. * import {Component} from 'angular2/core';
  52. * import {
  53. * ROUTER_DIRECTIVES,
  54. * ROUTER_PROVIDERS,
  55. * RouteConfig
  56. * } from 'angular2/router';
  57. *
  58. * @Component({directives: [ROUTER_DIRECTIVES]})
  59. * @RouteConfig([
  60. * {...},
  61. * ])
  62. * class AppCmp {
  63. * // ...
  64. * }
  65. *
  66. * bootstrap(AppCmp, [ROUTER_PROVIDERS]);
  67. * ```
  68. */
  69. export declare const ROUTER_PROVIDERS: any[];
  70. /**
  71. * Use {@link ROUTER_PROVIDERS} instead.
  72. *
  73. * @deprecated
  74. */
  75. export declare const ROUTER_BINDINGS: any[];