@angular/router 7.0.0-rc.1 → 7.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (86) hide show
  1. package/bundles/router-testing.umd.js +4 -4
  2. package/bundles/router-testing.umd.js.map +1 -1
  3. package/bundles/router-testing.umd.min.js +1 -1
  4. package/bundles/router-testing.umd.min.js.map +1 -1
  5. package/bundles/router-upgrade.umd.js +3 -3
  6. package/bundles/router-upgrade.umd.js.map +1 -1
  7. package/bundles/router-upgrade.umd.min.js +1 -1
  8. package/bundles/router-upgrade.umd.min.js.map +1 -1
  9. package/bundles/router.umd.js +56 -50
  10. package/bundles/router.umd.js.map +1 -1
  11. package/bundles/router.umd.min.js +4 -4
  12. package/bundles/router.umd.min.js.map +1 -1
  13. package/esm2015/src/config.js +2 -1
  14. package/esm2015/src/directives/router_link.js +3 -3
  15. package/esm2015/src/directives/router_link_active.js +2 -2
  16. package/esm2015/src/directives/router_outlet.js +2 -2
  17. package/esm2015/src/events.js +19 -17
  18. package/esm2015/src/interfaces.js +6 -5
  19. package/esm2015/src/route_reuse_strategy.js +2 -2
  20. package/esm2015/src/router.js +4 -3
  21. package/esm2015/src/router_config_loader.js +2 -2
  22. package/esm2015/src/router_module.js +6 -6
  23. package/esm2015/src/router_outlet_context.js +3 -3
  24. package/esm2015/src/router_preloader.js +5 -5
  25. package/esm2015/src/router_state.js +5 -5
  26. package/esm2015/src/shared.js +4 -4
  27. package/esm2015/src/url_handling_strategy.js +3 -3
  28. package/esm2015/src/url_tree.js +6 -6
  29. package/esm2015/src/utils/preactivation.js +3 -3
  30. package/esm2015/src/version.js +5 -3
  31. package/esm2015/testing/src/router_testing_module.js +4 -4
  32. package/esm2015/upgrade/src/upgrade.js +3 -3
  33. package/esm5/src/config.js +1 -1
  34. package/esm5/src/directives/router_link.js +3 -3
  35. package/esm5/src/directives/router_link_active.js +2 -2
  36. package/esm5/src/directives/router_outlet.js +2 -2
  37. package/esm5/src/events.js +19 -17
  38. package/esm5/src/interfaces.js +1 -1
  39. package/esm5/src/route_reuse_strategy.js +2 -2
  40. package/esm5/src/router.js +3 -2
  41. package/esm5/src/router_config_loader.js +2 -2
  42. package/esm5/src/router_module.js +5 -5
  43. package/esm5/src/router_outlet_context.js +3 -3
  44. package/esm5/src/router_preloader.js +5 -5
  45. package/esm5/src/router_state.js +5 -5
  46. package/esm5/src/shared.js +3 -3
  47. package/esm5/src/url_handling_strategy.js +3 -3
  48. package/esm5/src/url_tree.js +6 -6
  49. package/esm5/src/utils/preactivation.js +3 -3
  50. package/esm5/src/version.js +5 -2
  51. package/esm5/testing/src/router_testing_module.js +4 -4
  52. package/esm5/upgrade/src/upgrade.js +3 -3
  53. package/fesm2015/router.js +56 -51
  54. package/fesm2015/router.js.map +1 -1
  55. package/fesm2015/testing.js +4 -4
  56. package/fesm2015/testing.js.map +1 -1
  57. package/fesm2015/upgrade.js +3 -3
  58. package/fesm2015/upgrade.js.map +1 -1
  59. package/fesm5/router.js +56 -50
  60. package/fesm5/router.js.map +1 -1
  61. package/fesm5/testing.js +4 -4
  62. package/fesm5/testing.js.map +1 -1
  63. package/fesm5/upgrade.js +3 -3
  64. package/fesm5/upgrade.js.map +1 -1
  65. package/package.json +4 -4
  66. package/router.metadata.json +1 -1
  67. package/src/config.d.ts +9 -3
  68. package/src/directives/router_link.d.ts +2 -2
  69. package/src/directives/router_link_active.d.ts +1 -1
  70. package/src/directives/router_outlet.d.ts +1 -1
  71. package/src/events.d.ts +20 -18
  72. package/src/interfaces.d.ts +5 -4
  73. package/src/route_reuse_strategy.d.ts +2 -2
  74. package/src/router.d.ts +3 -3
  75. package/src/router_config_loader.d.ts +1 -1
  76. package/src/router_module.d.ts +6 -6
  77. package/src/router_outlet_context.d.ts +2 -2
  78. package/src/router_preloader.d.ts +4 -4
  79. package/src/router_state.d.ts +4 -4
  80. package/src/shared.d.ts +4 -4
  81. package/src/url_handling_strategy.d.ts +2 -2
  82. package/src/url_tree.d.ts +5 -5
  83. package/src/version.d.ts +3 -0
  84. package/testing/src/router_testing_module.d.ts +4 -3
  85. package/testing/testing.metadata.json +1 -1
  86. package/upgrade/src/upgrade.d.ts +2 -2
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v7.0.0-rc.1
2
+ * @license Angular v7.0.3
3
3
  * (c) 2010-2018 Google, Inc. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -40,7 +40,7 @@ import { ChildrenOutletContexts, NoPreloading, PreloadingStrategy, ROUTER_CONFIG
40
40
  * router.navigateByUrl('/lazy/loaded');
41
41
  * ```
42
42
  *
43
- *
43
+ * \@publicApi
44
44
  */
45
45
  class SpyNgModuleFactoryLoader {
46
46
  /**
@@ -103,7 +103,7 @@ function isUrlHandlingStrategy(opts) {
103
103
  /**
104
104
  * Router setup factory function used for testing.
105
105
  *
106
- *
106
+ * \@publicApi
107
107
  * @param {?} urlSerializer
108
108
  * @param {?} contexts
109
109
  * @param {?} location
@@ -162,7 +162,7 @@ function setupTestingRouter(urlSerializer, contexts, location, loader, compiler,
162
162
  * });
163
163
  * ```
164
164
  *
165
- *
165
+ * \@publicApi
166
166
  */
167
167
  class RouterTestingModule {
168
168
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"testing.js","sources":["../testing/src/router_testing_module.ts","../testing/testing.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Location, LocationStrategy} from '@angular/common';\nimport {MockLocationStrategy, SpyLocation} from '@angular/common/testing';\nimport {Compiler, Injectable, Injector, ModuleWithProviders, NgModule, NgModuleFactory, NgModuleFactoryLoader, Optional} from '@angular/core';\nimport {ChildrenOutletContexts, ExtraOptions, NoPreloading, PreloadingStrategy, ROUTER_CONFIGURATION, ROUTES, Route, Router, RouterModule, Routes, UrlHandlingStrategy, UrlSerializer, provideRoutes, ɵROUTER_PROVIDERS as ROUTER_PROVIDERS, ɵflatten as flatten} from '@angular/router';\n\n\n\n/**\n * @description\n *\n * Allows to simulate the loading of ng modules in tests.\n *\n * ```\n * const loader = TestBed.get(NgModuleFactoryLoader);\n *\n * @Component({template: 'lazy-loaded'})\n * class LazyLoadedComponent {}\n * @NgModule({\n * declarations: [LazyLoadedComponent],\n * imports: [RouterModule.forChild([{path: 'loaded', component: LazyLoadedComponent}])]\n * })\n *\n * class LoadedModule {}\n *\n * // sets up stubbedModules\n * loader.stubbedModules = {lazyModule: LoadedModule};\n *\n * router.resetConfig([\n * {path: 'lazy', loadChildren: 'lazyModule'},\n * ]);\n *\n * router.navigateByUrl('/lazy/loaded');\n * ```\n *\n *\n */\n@Injectable()\nexport class SpyNgModuleFactoryLoader implements NgModuleFactoryLoader {\n /**\n * @docsNotRequired\n */\n private _stubbedModules: {[path: string]: Promise<NgModuleFactory<any>>} = {};\n\n /**\n * @docsNotRequired\n */\n set stubbedModules(modules: {[path: string]: any}) {\n const res: {[path: string]: any} = {};\n for (const t of Object.keys(modules)) {\n res[t] = this.compiler.compileModuleAsync(modules[t]);\n }\n this._stubbedModules = res;\n }\n\n /**\n * @docsNotRequired\n */\n get stubbedModules(): {[path: string]: any} { return this._stubbedModules; }\n\n constructor(private compiler: Compiler) {}\n\n load(path: string): Promise<NgModuleFactory<any>> {\n if (this._stubbedModules[path]) {\n return this._stubbedModules[path];\n } else {\n return <any>Promise.reject(new Error(`Cannot find module ${path}`));\n }\n }\n}\n\nfunction isUrlHandlingStrategy(opts: ExtraOptions | UrlHandlingStrategy):\n opts is UrlHandlingStrategy {\n // This property check is needed because UrlHandlingStrategy is an interface and doesn't exist at\n // runtime.\n return 'shouldProcessUrl' in opts;\n}\n\n/**\n * Router setup factory function used for testing.\n *\n *\n */\nexport function setupTestingRouter(\n urlSerializer: UrlSerializer, contexts: ChildrenOutletContexts, location: Location,\n loader: NgModuleFactoryLoader, compiler: Compiler, injector: Injector, routes: Route[][],\n opts?: ExtraOptions, urlHandlingStrategy?: UrlHandlingStrategy): Router;\n\n/**\n * Router setup factory function used for testing.\n *\n * @deprecated As of v5.2. The 2nd-to-last argument should be `ExtraOptions`, not\n * `UrlHandlingStrategy`\n */\nexport function setupTestingRouter(\n urlSerializer: UrlSerializer, contexts: ChildrenOutletContexts, location: Location,\n loader: NgModuleFactoryLoader, compiler: Compiler, injector: Injector, routes: Route[][],\n urlHandlingStrategy?: UrlHandlingStrategy): Router;\n\n/**\n * Router setup factory function used for testing.\n *\n *\n */\nexport function setupTestingRouter(\n urlSerializer: UrlSerializer, contexts: ChildrenOutletContexts, location: Location,\n loader: NgModuleFactoryLoader, compiler: Compiler, injector: Injector, routes: Route[][],\n opts?: ExtraOptions | UrlHandlingStrategy, urlHandlingStrategy?: UrlHandlingStrategy) {\n const router = new Router(\n null !, urlSerializer, contexts, location, injector, loader, compiler, flatten(routes));\n if (opts) {\n // Handle deprecated argument ordering.\n if (isUrlHandlingStrategy(opts)) {\n router.urlHandlingStrategy = opts;\n } else {\n // Handle ExtraOptions\n\n if (opts.malformedUriErrorHandler) {\n router.malformedUriErrorHandler = opts.malformedUriErrorHandler;\n }\n\n if (opts.paramsInheritanceStrategy) {\n router.paramsInheritanceStrategy = opts.paramsInheritanceStrategy;\n }\n }\n }\n\n if (urlHandlingStrategy) {\n router.urlHandlingStrategy = urlHandlingStrategy;\n }\n return router;\n}\n\n/**\n * @description\n *\n * Sets up the router to be used for testing.\n *\n * The modules sets up the router to be used for testing.\n * It provides spy implementations of `Location`, `LocationStrategy`, and {@link\n * NgModuleFactoryLoader}.\n *\n * @usageNotes\n * ### Example\n *\n * ```\n * beforeEach(() => {\n * TestBed.configureTestModule({\n * imports: [\n * RouterTestingModule.withRoutes(\n * [{path: '', component: BlankCmp}, {path: 'simple', component: SimpleCmp}]\n * )\n * ]\n * });\n * });\n * ```\n *\n *\n */\n@NgModule({\n exports: [RouterModule],\n providers: [\n ROUTER_PROVIDERS, {provide: Location, useClass: SpyLocation},\n {provide: LocationStrategy, useClass: MockLocationStrategy},\n {provide: NgModuleFactoryLoader, useClass: SpyNgModuleFactoryLoader}, {\n provide: Router,\n useFactory: setupTestingRouter,\n deps: [\n UrlSerializer, ChildrenOutletContexts, Location, NgModuleFactoryLoader, Compiler, Injector,\n ROUTES, ROUTER_CONFIGURATION, [UrlHandlingStrategy, new Optional()]\n ]\n },\n {provide: PreloadingStrategy, useExisting: NoPreloading}, provideRoutes([])\n ]\n})\nexport class RouterTestingModule {\n static withRoutes(routes: Routes, config?: ExtraOptions):\n ModuleWithProviders<RouterTestingModule> {\n return {\n ngModule: RouterTestingModule,\n providers: [\n provideRoutes(routes),\n {provide: ROUTER_CONFIGURATION, useValue: config ? config : {}},\n ]\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["flatten","ROUTER_PROVIDERS"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6CA,MAAa,wBAAwB;;;;IAsBnC,YAAoB,QAAkB;QAAlB,aAAQ,GAAR,QAAQ,CAAU;;;;+BAlBqC,EAAE;KAkBnC;;;;;;IAb1C,IAAI,cAAc,CAAC,OAA8B;;QAC/C,MAAM,GAAG,GAA0B,EAAE,CAAC;QACtC,KAAK,MAAM,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE;YACpC,GAAG,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;SACvD;QACD,IAAI,CAAC,eAAe,GAAG,GAAG,CAAC;KAC5B;;;;;IAKD,IAAI,cAAc,KAA4B,OAAO,IAAI,CAAC,eAAe,CAAC,EAAE;;;;;IAI5E,IAAI,CAAC,IAAY;QACf,IAAI,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,EAAE;YAC9B,OAAO,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;SACnC;aAAM;YACL,yB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AAE,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,EAAE,EAAC;aAChE;SACF,CAAC;KACH;;;YA1BF,QAAQ,SAAC;gBACR,OAAO,EAAE,CAAC,YAAY,CAAC;gBACvB,SAAS,EAAE;oBACTC,iBAAgB,EAAE,EAAC,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,WAAW,EAAC;oBAC5D,EAAC,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,oBAAoB,EAAC;oBAC3D,EAAC,OAAO,EAAE,qBAAqB,EAAE,QAAQ,EAAE,wBAAwB,EAAC,EAAE;wBACpE,OAAO,EAAE,MAAM;wBACf,UAAU,EAAE,kBAAkB;wBAC9B,IAAI,EAAE;4BACJ,aAAa,EAAE,sBAAsB,EAAE,QAAQ,EAAE,qBAAqB,EAAE,QAAQ,EAAE,QAAQ;4BAC1F,MAAM,EAAE,oBAAoB,EAAE,CAAC,mBAAmB,EAAE,IAAI,QAAQ,EAAE,CAAC;yBACpE;qBACF;oBACD,EAAC,OAAO,EAAE,kBAAkB,EAAE,WAAW,EAAE,YAAY,EAAC,EAAE,aAAa,CAAC,EAAE,CAAC;iBAC5E;aACF;;;;;;;;;;;;;;;;;;;ACrLD;;GAEG;;;;"}
1
+ {"version":3,"file":"testing.js","sources":["../testing/src/router_testing_module.ts","../testing/testing.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Location, LocationStrategy} from '@angular/common';\nimport {MockLocationStrategy, SpyLocation} from '@angular/common/testing';\nimport {Compiler, Injectable, Injector, ModuleWithProviders, NgModule, NgModuleFactory, NgModuleFactoryLoader, Optional} from '@angular/core';\nimport {ChildrenOutletContexts, ExtraOptions, NoPreloading, PreloadingStrategy, ROUTER_CONFIGURATION, ROUTES, Route, Router, RouterModule, Routes, UrlHandlingStrategy, UrlSerializer, provideRoutes, ɵROUTER_PROVIDERS as ROUTER_PROVIDERS, ɵflatten as flatten} from '@angular/router';\n\n\n\n/**\n * @description\n *\n * Allows to simulate the loading of ng modules in tests.\n *\n * ```\n * const loader = TestBed.get(NgModuleFactoryLoader);\n *\n * @Component({template: 'lazy-loaded'})\n * class LazyLoadedComponent {}\n * @NgModule({\n * declarations: [LazyLoadedComponent],\n * imports: [RouterModule.forChild([{path: 'loaded', component: LazyLoadedComponent}])]\n * })\n *\n * class LoadedModule {}\n *\n * // sets up stubbedModules\n * loader.stubbedModules = {lazyModule: LoadedModule};\n *\n * router.resetConfig([\n * {path: 'lazy', loadChildren: 'lazyModule'},\n * ]);\n *\n * router.navigateByUrl('/lazy/loaded');\n * ```\n *\n * @publicApi\n */\n@Injectable()\nexport class SpyNgModuleFactoryLoader implements NgModuleFactoryLoader {\n /**\n * @docsNotRequired\n */\n private _stubbedModules: {[path: string]: Promise<NgModuleFactory<any>>} = {};\n\n /**\n * @docsNotRequired\n */\n set stubbedModules(modules: {[path: string]: any}) {\n const res: {[path: string]: any} = {};\n for (const t of Object.keys(modules)) {\n res[t] = this.compiler.compileModuleAsync(modules[t]);\n }\n this._stubbedModules = res;\n }\n\n /**\n * @docsNotRequired\n */\n get stubbedModules(): {[path: string]: any} { return this._stubbedModules; }\n\n constructor(private compiler: Compiler) {}\n\n load(path: string): Promise<NgModuleFactory<any>> {\n if (this._stubbedModules[path]) {\n return this._stubbedModules[path];\n } else {\n return <any>Promise.reject(new Error(`Cannot find module ${path}`));\n }\n }\n}\n\nfunction isUrlHandlingStrategy(opts: ExtraOptions | UrlHandlingStrategy):\n opts is UrlHandlingStrategy {\n // This property check is needed because UrlHandlingStrategy is an interface and doesn't exist at\n // runtime.\n return 'shouldProcessUrl' in opts;\n}\n\n/**\n * Router setup factory function used for testing.\n *\n * @publicApi\n */\nexport function setupTestingRouter(\n urlSerializer: UrlSerializer, contexts: ChildrenOutletContexts, location: Location,\n loader: NgModuleFactoryLoader, compiler: Compiler, injector: Injector, routes: Route[][],\n opts?: ExtraOptions, urlHandlingStrategy?: UrlHandlingStrategy): Router;\n\n/**\n * Router setup factory function used for testing.\n *\n * @deprecated As of v5.2. The 2nd-to-last argument should be `ExtraOptions`, not\n * `UrlHandlingStrategy`\n * @publicApi\n */\nexport function setupTestingRouter(\n urlSerializer: UrlSerializer, contexts: ChildrenOutletContexts, location: Location,\n loader: NgModuleFactoryLoader, compiler: Compiler, injector: Injector, routes: Route[][],\n urlHandlingStrategy?: UrlHandlingStrategy): Router;\n\n/**\n * Router setup factory function used for testing.\n *\n * @publicApi\n */\nexport function setupTestingRouter(\n urlSerializer: UrlSerializer, contexts: ChildrenOutletContexts, location: Location,\n loader: NgModuleFactoryLoader, compiler: Compiler, injector: Injector, routes: Route[][],\n opts?: ExtraOptions | UrlHandlingStrategy, urlHandlingStrategy?: UrlHandlingStrategy) {\n const router = new Router(\n null !, urlSerializer, contexts, location, injector, loader, compiler, flatten(routes));\n if (opts) {\n // Handle deprecated argument ordering.\n if (isUrlHandlingStrategy(opts)) {\n router.urlHandlingStrategy = opts;\n } else {\n // Handle ExtraOptions\n\n if (opts.malformedUriErrorHandler) {\n router.malformedUriErrorHandler = opts.malformedUriErrorHandler;\n }\n\n if (opts.paramsInheritanceStrategy) {\n router.paramsInheritanceStrategy = opts.paramsInheritanceStrategy;\n }\n }\n }\n\n if (urlHandlingStrategy) {\n router.urlHandlingStrategy = urlHandlingStrategy;\n }\n return router;\n}\n\n/**\n * @description\n *\n * Sets up the router to be used for testing.\n *\n * The modules sets up the router to be used for testing.\n * It provides spy implementations of `Location`, `LocationStrategy`, and {@link\n * NgModuleFactoryLoader}.\n *\n * @usageNotes\n * ### Example\n *\n * ```\n * beforeEach(() => {\n * TestBed.configureTestModule({\n * imports: [\n * RouterTestingModule.withRoutes(\n * [{path: '', component: BlankCmp}, {path: 'simple', component: SimpleCmp}]\n * )\n * ]\n * });\n * });\n * ```\n *\n * @publicApi\n */\n@NgModule({\n exports: [RouterModule],\n providers: [\n ROUTER_PROVIDERS, {provide: Location, useClass: SpyLocation},\n {provide: LocationStrategy, useClass: MockLocationStrategy},\n {provide: NgModuleFactoryLoader, useClass: SpyNgModuleFactoryLoader}, {\n provide: Router,\n useFactory: setupTestingRouter,\n deps: [\n UrlSerializer, ChildrenOutletContexts, Location, NgModuleFactoryLoader, Compiler, Injector,\n ROUTES, ROUTER_CONFIGURATION, [UrlHandlingStrategy, new Optional()]\n ]\n },\n {provide: PreloadingStrategy, useExisting: NoPreloading}, provideRoutes([])\n ]\n})\nexport class RouterTestingModule {\n static withRoutes(routes: Routes, config?: ExtraOptions):\n ModuleWithProviders<RouterTestingModule> {\n return {\n ngModule: RouterTestingModule,\n providers: [\n provideRoutes(routes),\n {provide: ROUTER_CONFIGURATION, useValue: config ? config : {}},\n ]\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["flatten","ROUTER_PROVIDERS"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6CA,MAAa,wBAAwB;;;;IAsBnC,YAAoB,QAAkB;QAAlB,aAAQ,GAAR,QAAQ,CAAU;;;;+BAlBqC,EAAE;KAkBnC;;;;;;IAb1C,IAAI,cAAc,CAAC,OAA8B;;QAC/C,MAAM,GAAG,GAA0B,EAAE,CAAC;QACtC,KAAK,MAAM,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE;YACpC,GAAG,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;SACvD;QACD,IAAI,CAAC,eAAe,GAAG,GAAG,CAAC;KAC5B;;;;;IAKD,IAAI,cAAc,KAA4B,OAAO,IAAI,CAAC,eAAe,CAAC,EAAE;;;;;IAI5E,IAAI,CAAC,IAAY;QACf,IAAI,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,EAAE;YAC9B,OAAO,IAAI,CAAC,eAA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AAM,CAAC;gBACrB,EAAC,OAAO,EAAE,oBAAoB,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,EAAE,EAAC;aAChE;SACF,CAAC;KACH;;;YA1BF,QAAQ,SAAC;gBACR,OAAO,EAAE,CAAC,YAAY,CAAC;gBACvB,SAAS,EAAE;oBACTC,iBAAgB,EAAE,EAAC,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,WAAW,EAAC;oBAC5D,EAAC,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,oBAAoB,EAAC;oBAC3D,EAAC,OAAO,EAAE,qBAAqB,EAAE,QAAQ,EAAE,wBAAwB,EAAC,EAAE;wBACpE,OAAO,EAAE,MAAM;wBACf,UAAU,EAAE,kBAAkB;wBAC9B,IAAI,EAAE;4BACJ,aAAa,EAAE,sBAAsB,EAAE,QAAQ,EAAE,qBAAqB,EAAE,QAAQ,EAAE,QAAQ;4BAC1F,MAAM,EAAE,oBAAoB,EAAE,CAAC,mBAAmB,EAAE,IAAI,QAAQ,EAAE,CAAC;yBACpE;qBACF;oBACD,EAAC,OAAO,EAAE,kBAAkB,EAAE,WAAW,EAAE,YAAY,EAAC,EAAE,aAAa,CAAC,EAAE,CAAC;iBAC5E;aACF;;;;;;;;;;;;;;;;;;;ACtLD;;GAEG;;;;"}
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v7.0.0-rc.1
2
+ * @license Angular v7.0.3
3
3
  * (c) 2010-2018 Google, Inc. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -34,7 +34,7 @@ import { UpgradeModule } from '@angular/upgrade/static';
34
34
  * }
35
35
  * ```
36
36
  *
37
- * \@experimental
37
+ * \@publicApi
38
38
  @type {?} */
39
39
  const RouterUpgradeInitializer = {
40
40
  provide: APP_BOOTSTRAP_LISTENER,
@@ -58,7 +58,7 @@ function locationSyncBootstrapListener(ngUpgrade) {
58
58
  * History.pushState does not fire onPopState, so the Angular location
59
59
  * doesn't detect it. The workaround is to attach a location change listener
60
60
  *
61
- * \@experimental
61
+ * \@publicApi
62
62
  * @param {?} ngUpgrade
63
63
  * @return {?}
64
64
  */
@@ -1 +1 @@
1
- {"version":3,"file":"upgrade.js","sources":["../upgrade/src/upgrade.ts","../upgrade/upgrade.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Location} from '@angular/common';\nimport {APP_BOOTSTRAP_LISTENER, ComponentRef, InjectionToken} from '@angular/core';\nimport {Router} from '@angular/router';\nimport {UpgradeModule} from '@angular/upgrade/static';\n\n/**\n * @description\n *\n * Creates an initializer that in addition to setting up the Angular\n * router sets up the ngRoute integration.\n *\n * ```\n * @NgModule({\n * imports: [\n * RouterModule.forRoot(SOME_ROUTES),\n * UpgradeModule\n * ],\n * providers: [\n * RouterUpgradeInitializer\n * ]\n * })\n * export class AppModule {\n * ngDoBootstrap() {}\n * }\n * ```\n *\n * @experimental\n */\nexport const RouterUpgradeInitializer = {\n provide: APP_BOOTSTRAP_LISTENER,\n multi: true,\n useFactory: locationSyncBootstrapListener as(ngUpgrade: UpgradeModule) => () => void,\n deps: [UpgradeModule]\n};\n\n/**\n * @internal\n */\nexport function locationSyncBootstrapListener(ngUpgrade: UpgradeModule) {\n return () => { setUpLocationSync(ngUpgrade); };\n}\n\n/**\n * @description\n *\n * Sets up a location synchronization.\n *\n * History.pushState does not fire onPopState, so the Angular location\n * doesn't detect it. The workaround is to attach a location change listener\n *\n * @experimental\n */\nexport function setUpLocationSync(ngUpgrade: UpgradeModule) {\n if (!ngUpgrade.$injector) {\n throw new Error(`\n RouterUpgradeInitializer can be used only after UpgradeModule.bootstrap has been called.\n Remove RouterUpgradeInitializer and call setUpLocationSync after UpgradeModule.bootstrap.\n `);\n }\n\n const router: Router = ngUpgrade.injector.get(Router);\n const location: Location = ngUpgrade.injector.get(Location);\n\n ngUpgrade.$injector.get('$rootScope')\n .$on('$locationChangeStart', (_: any, next: string, __: string) => {\n const url = resolveUrl(next);\n const path = location.normalize(url.pathname);\n router.navigateByUrl(path + url.search + url.hash);\n });\n}\n\n/**\n * Normalize and parse a URL.\n *\n * - Normalizing means that a relative URL will be resolved into an absolute URL in the context of\n * the application document.\n * - Parsing means that the anchor's `protocol`, `hostname`, `port`, `pathname` and related\n * properties are all populated to reflect the normalized URL.\n *\n * While this approach has wide compatibility, it doesn't work as expected on IE. On IE, normalizing\n * happens similar to other browsers, but the parsed components will not be set. (E.g. if you assign\n * `a.href = 'foo'`, then `a.protocol`, `a.host`, etc. will not be correctly updated.)\n * We work around that by performing the parsing in a 2nd step by taking a previously normalized URL\n * and assigning it again. This correctly populates all properties.\n *\n * See\n * https://github.com/angular/angular.js/blob/2c7400e7d07b0f6cec1817dab40b9250ce8ebce6/src/ng/urlUtils.js#L26-L33\n * for more info.\n */\nlet anchor: HTMLAnchorElement|undefined;\nfunction resolveUrl(url: string): {pathname: string, search: string, hash: string} {\n if (!anchor) {\n anchor = document.createElement('a');\n }\n\n anchor.setAttribute('href', url);\n anchor.setAttribute('href', anchor.href);\n\n return {\n // IE does not start `pathname` with `/` like other browsers.\n pathname: `/${anchor.pathname.replace(/^\\//, '')}`,\n search: anchor.search,\n hash: anchor.hash\n };\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoCA,MAAa,wBAAwB,GAAG;IACtC,OAAO,EAAE,sBAAsB;IAC/B,KAAK,EAAE,IAAI;IACX,UAAU,oBAAE,6BAAwE,CAAA;IACpF,IAAI,EAAE,CAAC,aAAa,CAAC;CACtB,CAAC;;;;;;AAKF,SAAgB,6BAA6B,CAAC,SAAwB;IACpE,OAAO,QAAQ,iBAAiB,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC;CAChD;;;;;;;;;;;;;AAYD,SAAgB,iBAAiB,CAAC,SAAwB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.ts","../upgrade/upgrade.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Location} from '@angular/common';\nimport {APP_BOOTSTRAP_LISTENER, ComponentRef, InjectionToken} from '@angular/core';\nimport {Router} from '@angular/router';\nimport {UpgradeModule} from '@angular/upgrade/static';\n\n/**\n * @description\n *\n * Creates an initializer that in addition to setting up the Angular\n * router sets up the ngRoute integration.\n *\n * ```\n * @NgModule({\n * imports: [\n * RouterModule.forRoot(SOME_ROUTES),\n * UpgradeModule\n * ],\n * providers: [\n * RouterUpgradeInitializer\n * ]\n * })\n * export class AppModule {\n * ngDoBootstrap() {}\n * }\n * ```\n *\n * @publicApi\n */\nexport const RouterUpgradeInitializer = {\n provide: APP_BOOTSTRAP_LISTENER,\n multi: true,\n useFactory: locationSyncBootstrapListener as(ngUpgrade: UpgradeModule) => () => void,\n deps: [UpgradeModule]\n};\n\n/**\n * @internal\n */\nexport function locationSyncBootstrapListener(ngUpgrade: UpgradeModule) {\n return () => { setUpLocationSync(ngUpgrade); };\n}\n\n/**\n * @description\n *\n * Sets up a location synchronization.\n *\n * History.pushState does not fire onPopState, so the Angular location\n * doesn't detect it. The workaround is to attach a location change listener\n *\n * @publicApi\n */\nexport function setUpLocationSync(ngUpgrade: UpgradeModule) {\n if (!ngUpgrade.$injector) {\n throw new Error(`\n RouterUpgradeInitializer can be used only after UpgradeModule.bootstrap has been called.\n Remove RouterUpgradeInitializer and call setUpLocationSync after UpgradeModule.bootstrap.\n `);\n }\n\n const router: Router = ngUpgrade.injector.get(Router);\n const location: Location = ngUpgrade.injector.get(Location);\n\n ngUpgrade.$injector.get('$rootScope')\n .$on('$locationChangeStart', (_: any, next: string, __: string) => {\n const url = resolveUrl(next);\n const path = location.normalize(url.pathname);\n router.navigateByUrl(path + url.search + url.hash);\n });\n}\n\n/**\n * Normalize and parse a URL.\n *\n * - Normalizing means that a relative URL will be resolved into an absolute URL in the context of\n * the application document.\n * - Parsing means that the anchor's `protocol`, `hostname`, `port`, `pathname` and related\n * properties are all populated to reflect the normalized URL.\n *\n * While this approach has wide compatibility, it doesn't work as expected on IE. On IE, normalizing\n * happens similar to other browsers, but the parsed components will not be set. (E.g. if you assign\n * `a.href = 'foo'`, then `a.protocol`, `a.host`, etc. will not be correctly updated.)\n * We work around that by performing the parsing in a 2nd step by taking a previously normalized URL\n * and assigning it again. This correctly populates all properties.\n *\n * See\n * https://github.com/angular/angular.js/blob/2c7400e7d07b0f6cec1817dab40b9250ce8ebce6/src/ng/urlUtils.js#L26-L33\n * for more info.\n */\nlet anchor: HTMLAnchorElement|undefined;\nfunction resolveUrl(url: string): {pathname: string, search: string, hash: string} {\n if (!anchor) {\n anchor = document.createElement('a');\n }\n\n anchor.setAttribute('href', url);\n anchor.setAttribute('href', anchor.href);\n\n return {\n // IE does not start `pathname` with `/` like other browsers.\n pathname: `/${anchor.pathname.replace(/^\\//, '')}`,\n search: anchor.search,\n hash: anchor.hash\n };\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoCA,MAAa,wBAAwB,GAAG;IACtC,OAAO,EAAE,sBAAsB;IAC/B,KAAK,EAAE,IAAI;IACX,UAAU,oBAAE,6BAAwE,CAAA;IACpF,IAAI,EAAE,CAAC,aAAa,CAAC;CACtB,CAAC;;;;;;AAKF,SAAgB,6BAA6B,CAAC,SAAwB;IACpE,OAAO,QAAQ,iBAAiB,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC;CAChD;;;;;;;;;;;;;AAYD,SAAgB,iBAAiB,CAAC,SAAwB;IACxD,IAAI,CAAC,SAAS,CAAC,SAAS,EAAE;QACxB,MAAM,IAAI,KAAK,CAAC;;;OAGb,CAAC,CAAC;KACN;;IAED,MAAM,MAAM,GAAW,SAAS,CAAC,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;;IACtD,MAAM,QAAQ,GAAa,SAAS,CAAC,QAAQ,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IAE5D,SAAS,CAAC,SAAS,CAAC,GAAG,CAAC,YAAY,CAAC;SAChC,GAAG,CAAC,sBAAsB,EAAE,CAAC,CAAM,EAAE,IAAY,EAAE,EAAU;;QAC5D,MAAM,GAAG,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC;;QAC7B,MAAM,IAAI,GAAG,QAAQ,CAAC,SAAS,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QAC9C,MAAM,CAAC,aAAa,CAAC,IAAI,GAAG,GAAG,CAAC,MAAM,GAAG,GAAG,CAAC,IAAI,CAAC,CAAC;KACpD,CAAC,CAAC;CACR;;;;;;;;;;;;;;;;;;;AAoBD,IAAI,MAAM,CAA8B;;;;;AACxC,SAAS,UAAU,CAAC,GAAW;IAC7B,IAAI,CAAC,MAAM,EAAE;QACX,MAAM,GAAG,QAAQ,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;KACtC;IAED,MAAM,CAAC,YAAY,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACjC,MAAM,CAAC,YAAY,CAAC,MAAM,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC;IAEzC,OAAO;;QAEL,QAAQ,EAAE,IAAI,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,EAAE;QAClD,MAAM,EAAE,MAAM,CAAC,MAAM;QACrB,IAAI,EAAE,MAAM,CAAC,IAAI;KAClB,CAAC;CACH;;;;;;;;;;;;;AChHD;;GAEG;;;;"}
package/fesm5/router.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v7.0.0-rc.1
2
+ * @license Angular v7.0.3
3
3
  * (c) 2010-2018 Google, Inc. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -36,7 +36,7 @@ import { ɵgetDOM } from '@angular/platform-browser';
36
36
  * }
37
37
  * ```
38
38
  *
39
- * @experimental
39
+ * @publicApi
40
40
  */
41
41
  var RouterEvent = /** @class */ (function () {
42
42
  function RouterEvent(
@@ -54,7 +54,7 @@ var RouterEvent = /** @class */ (function () {
54
54
  *
55
55
  * Represents an event triggered when a navigation starts.
56
56
  *
57
- *
57
+ * @publicApi
58
58
  */
59
59
  var NavigationStart = /** @class */ (function (_super) {
60
60
  __extends(NavigationStart, _super);
@@ -83,7 +83,7 @@ var NavigationStart = /** @class */ (function (_super) {
83
83
  *
84
84
  * Represents an event triggered when a navigation ends successfully.
85
85
  *
86
- *
86
+ * @publicApi
87
87
  */
88
88
  var NavigationEnd = /** @class */ (function (_super) {
89
89
  __extends(NavigationEnd, _super);
@@ -109,7 +109,7 @@ var NavigationEnd = /** @class */ (function (_super) {
109
109
  *
110
110
  * Represents an event triggered when a navigation is canceled.
111
111
  *
112
- *
112
+ * @publicApi
113
113
  */
114
114
  var NavigationCancel = /** @class */ (function (_super) {
115
115
  __extends(NavigationCancel, _super);
@@ -133,7 +133,7 @@ var NavigationCancel = /** @class */ (function (_super) {
133
133
  *
134
134
  * Represents an event triggered when a navigation fails due to an unexpected error.
135
135
  *
136
- *
136
+ * @publicApi
137
137
  */
138
138
  var NavigationError = /** @class */ (function (_super) {
139
139
  __extends(NavigationError, _super);
@@ -159,7 +159,7 @@ var NavigationError = /** @class */ (function (_super) {
159
159
  *
160
160
  * Represents an event triggered when routes are recognized.
161
161
  *
162
- *
162
+ * @publicApi
163
163
  */
164
164
  var RoutesRecognized = /** @class */ (function (_super) {
165
165
  __extends(RoutesRecognized, _super);
@@ -188,7 +188,7 @@ var RoutesRecognized = /** @class */ (function (_super) {
188
188
  *
189
189
  * Represents the start of the Guard phase of routing.
190
190
  *
191
- * @experimental
191
+ * @publicApi
192
192
  */
193
193
  var GuardsCheckStart = /** @class */ (function (_super) {
194
194
  __extends(GuardsCheckStart, _super);
@@ -216,7 +216,7 @@ var GuardsCheckStart = /** @class */ (function (_super) {
216
216
  *
217
217
  * Represents the end of the Guard phase of routing.
218
218
  *
219
- * @experimental
219
+ * @publicApi
220
220
  */
221
221
  var GuardsCheckEnd = /** @class */ (function (_super) {
222
222
  __extends(GuardsCheckEnd, _super);
@@ -250,7 +250,7 @@ var GuardsCheckEnd = /** @class */ (function (_super) {
250
250
  * in the "resolve" phase whether there's things to resolve or not. In the future this
251
251
  * behavior may change to only run when there are things to be resolved.
252
252
  *
253
- * @experimental
253
+ * @publicApi
254
254
  */
255
255
  var ResolveStart = /** @class */ (function (_super) {
256
256
  __extends(ResolveStart, _super);
@@ -279,7 +279,7 @@ var ResolveStart = /** @class */ (function (_super) {
279
279
  * Represents the end of the Resolve phase of routing. See note on
280
280
  * `ResolveStart` for use of this experimental API.
281
281
  *
282
- * @experimental
282
+ * @publicApi
283
283
  */
284
284
  var ResolveEnd = /** @class */ (function (_super) {
285
285
  __extends(ResolveEnd, _super);
@@ -307,7 +307,7 @@ var ResolveEnd = /** @class */ (function (_super) {
307
307
  *
308
308
  * Represents an event triggered before lazy loading a route config.
309
309
  *
310
- * @experimental
310
+ * @publicApi
311
311
  */
312
312
  var RouteConfigLoadStart = /** @class */ (function () {
313
313
  function RouteConfigLoadStart(
@@ -323,7 +323,7 @@ var RouteConfigLoadStart = /** @class */ (function () {
323
323
  *
324
324
  * Represents an event triggered when a route has been lazy loaded.
325
325
  *
326
- * @experimental
326
+ * @publicApi
327
327
  */
328
328
  var RouteConfigLoadEnd = /** @class */ (function () {
329
329
  function RouteConfigLoadEnd(
@@ -340,7 +340,7 @@ var RouteConfigLoadEnd = /** @class */ (function () {
340
340
  * Represents the start of end of the Resolve phase of routing. See note on
341
341
  * `ChildActivationEnd` for use of this experimental API.
342
342
  *
343
- * @experimental
343
+ * @publicApi
344
344
  */
345
345
  var ChildActivationStart = /** @class */ (function () {
346
346
  function ChildActivationStart(
@@ -360,7 +360,7 @@ var ChildActivationStart = /** @class */ (function () {
360
360
  * Represents the start of end of the Resolve phase of routing. See note on
361
361
  * `ChildActivationStart` for use of this experimental API.
362
362
  *
363
- * @experimental
363
+ * @publicApi
364
364
  */
365
365
  var ChildActivationEnd = /** @class */ (function () {
366
366
  function ChildActivationEnd(
@@ -380,7 +380,7 @@ var ChildActivationEnd = /** @class */ (function () {
380
380
  * Represents the start of end of the Resolve phase of routing. See note on
381
381
  * `ActivationEnd` for use of this experimental API.
382
382
  *
383
- * @experimental
383
+ * @publicApi
384
384
  */
385
385
  var ActivationStart = /** @class */ (function () {
386
386
  function ActivationStart(
@@ -400,7 +400,7 @@ var ActivationStart = /** @class */ (function () {
400
400
  * Represents the start of end of the Resolve phase of routing. See note on
401
401
  * `ActivationStart` for use of this experimental API.
402
402
  *
403
- * @experimental
403
+ * @publicApi
404
404
  */
405
405
  var ActivationEnd = /** @class */ (function () {
406
406
  function ActivationEnd(
@@ -418,6 +418,8 @@ var ActivationEnd = /** @class */ (function () {
418
418
  * @description
419
419
  *
420
420
  * Represents a scrolling event.
421
+ *
422
+ * @publicApi
421
423
  */
422
424
  var Scroll = /** @class */ (function () {
423
425
  function Scroll(
@@ -475,7 +477,7 @@ var EmptyOutletComponent = /** @class */ (function () {
475
477
  *
476
478
  * Name of the primary outlet.
477
479
  *
478
- *
480
+ * @publicApi
479
481
  */
480
482
  var PRIMARY_OUTLET = 'primary';
481
483
  var ParamsAsMap = /** @class */ (function () {
@@ -507,7 +509,7 @@ var ParamsAsMap = /** @class */ (function () {
507
509
  /**
508
510
  * Convert a `Params` instance to a `ParamMap`.
509
511
  *
510
- *
512
+ * @publicApi
511
513
  */
512
514
  function convertToParamMap(params) {
513
515
  return new ParamsAsMap(params);
@@ -838,7 +840,7 @@ function containsSegmentGroupHelper(container, containee, containeePaths) {
838
840
  * }
839
841
  * ```
840
842
  *
841
- *
843
+ * @publicApi
842
844
  */
843
845
  var UrlTree = /** @class */ (function () {
844
846
  /** @internal */
@@ -874,7 +876,7 @@ var UrlTree = /** @class */ (function () {
874
876
  *
875
877
  * See `UrlTree` for more information.
876
878
  *
877
- *
879
+ * @publicApi
878
880
  */
879
881
  var UrlSegmentGroup = /** @class */ (function () {
880
882
  function UrlSegmentGroup(
@@ -925,7 +927,7 @@ var UrlSegmentGroup = /** @class */ (function () {
925
927
  * }
926
928
  * ```
927
929
  *
928
- *
930
+ * @publicApi
929
931
  */
930
932
  var UrlSegment = /** @class */ (function () {
931
933
  function UrlSegment(
@@ -982,7 +984,7 @@ function mapChildrenIntoArray(segment, fn) {
982
984
  *
983
985
  * See `DefaultUrlSerializer` for an example of a URL serializer.
984
986
  *
985
- *
987
+ * @publicApi
986
988
  */
987
989
  var UrlSerializer = /** @class */ (function () {
988
990
  function UrlSerializer() {
@@ -1005,7 +1007,7 @@ var UrlSerializer = /** @class */ (function () {
1005
1007
  * colon syntax to specify the outlet, and the ';parameter=value' syntax (e.g., open=true) to
1006
1008
  * specify route specific parameters.
1007
1009
  *
1008
- *
1010
+ * @publicApi
1009
1011
  */
1010
1012
  var DefaultUrlSerializer = /** @class */ (function () {
1011
1013
  function DefaultUrlSerializer() {
@@ -1447,7 +1449,7 @@ function nodeChildrenAsMap(node) {
1447
1449
  *
1448
1450
  * See `ActivatedRoute` for more information.
1449
1451
  *
1450
- *
1452
+ * @publicApi
1451
1453
  */
1452
1454
  var RouterState = /** @class */ (function (_super) {
1453
1455
  __extends(RouterState, _super);
@@ -1500,7 +1502,7 @@ function createEmptyStateSnapshot(urlTree, rootComponent) {
1500
1502
  * }
1501
1503
  * ```
1502
1504
  *
1503
- *
1505
+ * @publicApi
1504
1506
  */
1505
1507
  var ActivatedRoute = /** @class */ (function () {
1506
1508
  /** @internal */
@@ -1647,7 +1649,7 @@ function flattenInherited(pathFromRoot) {
1647
1649
  * }
1648
1650
  * ```
1649
1651
  *
1650
- *
1652
+ * @publicApi
1651
1653
  */
1652
1654
  var ActivatedRouteSnapshot = /** @class */ (function () {
1653
1655
  /** @internal */
@@ -1760,7 +1762,7 @@ var ActivatedRouteSnapshot = /** @class */ (function () {
1760
1762
  * }
1761
1763
  * ```
1762
1764
  *
1763
- *
1765
+ * @publicApi
1764
1766
  */
1765
1767
  var RouterStateSnapshot = /** @class */ (function (_super) {
1766
1768
  __extends(RouterStateSnapshot, _super);
@@ -2870,8 +2872,8 @@ function getRouteGuards(futureNode, currNode, parentContexts, futurePath, checks
2870
2872
  getChildRouteGuards(futureNode, currNode, parentContexts, futurePath, checks);
2871
2873
  }
2872
2874
  if (shouldRun) {
2873
- var outlet = context.outlet;
2874
- checks.canDeactivateChecks.push(new CanDeactivate(outlet.component, curr));
2875
+ var component = context && context.outlet && context.outlet.component || null;
2876
+ checks.canDeactivateChecks.push(new CanDeactivate(component, curr));
2875
2877
  }
2876
2878
  }
2877
2879
  else {
@@ -3437,7 +3439,7 @@ function switchTap(next) {
3437
3439
  *
3438
3440
  * Provides a way to customize when activated routes get reused.
3439
3441
  *
3440
- * @experimental
3442
+ * @publicApi
3441
3443
  */
3442
3444
  var RouteReuseStrategy = /** @class */ (function () {
3443
3445
  function RouteReuseStrategy() {
@@ -3469,7 +3471,7 @@ var DefaultRouteReuseStrategy = /** @class */ (function () {
3469
3471
  */
3470
3472
  /**
3471
3473
  * @docsNotRequired
3472
- * @experimental
3474
+ * @publicApi
3473
3475
  */
3474
3476
  var ROUTES = new InjectionToken('ROUTES');
3475
3477
  var RouterConfigLoader = /** @class */ (function () {
@@ -3524,7 +3526,7 @@ var RouterConfigLoader = /** @class */ (function () {
3524
3526
  *
3525
3527
  * Provides a way to migrate AngularJS applications to Angular.
3526
3528
  *
3527
- * @experimental
3529
+ * @publicApi
3528
3530
  */
3529
3531
  var UrlHandlingStrategy = /** @class */ (function () {
3530
3532
  function UrlHandlingStrategy() {
@@ -3532,7 +3534,7 @@ var UrlHandlingStrategy = /** @class */ (function () {
3532
3534
  return UrlHandlingStrategy;
3533
3535
  }());
3534
3536
  /**
3535
- * @experimental
3537
+ * @publicApi
3536
3538
  */
3537
3539
  var DefaultUrlHandlingStrategy = /** @class */ (function () {
3538
3540
  function DefaultUrlHandlingStrategy() {
@@ -3571,7 +3573,7 @@ function defaultRouterHook(snapshot, runExtras) {
3571
3573
  *
3572
3574
  * @ngModule RouterModule
3573
3575
  *
3574
- *
3576
+ * @publicApi
3575
3577
  */
3576
3578
  var Router = /** @class */ (function () {
3577
3579
  /**
@@ -3844,6 +3846,7 @@ var Router = /** @class */ (function () {
3844
3846
  _this.resetStateAndUrl(t.currentRouterState, t.currentUrlTree, t.rawUrl);
3845
3847
  var navCancel = new NavigationCancel(t.id, _this.serializeUrl(t.extractedUrl), e.message);
3846
3848
  eventsSubject.next(navCancel);
3849
+ t.resolve(false);
3847
3850
  /* All other errors should reset to the router's internal URL reference to the
3848
3851
  * pre-error state. */
3849
3852
  }
@@ -4268,7 +4271,7 @@ function validateCommands(commands) {
4268
4271
  *
4269
4272
  * @ngModule RouterModule
4270
4273
  *
4271
- *
4274
+ * @publicApi
4272
4275
  */
4273
4276
  var RouterLink = /** @class */ (function () {
4274
4277
  function RouterLink(router, route, tabIndex, renderer, el) {
@@ -4382,7 +4385,7 @@ var RouterLink = /** @class */ (function () {
4382
4385
  *
4383
4386
  * @ngModule RouterModule
4384
4387
  *
4385
- *
4388
+ * @publicApi
4386
4389
  */
4387
4390
  var RouterLinkWithHref = /** @class */ (function () {
4388
4391
  function RouterLinkWithHref(router, route, locationStrategy) {
@@ -4573,7 +4576,7 @@ function attrBoolValue(s) {
4573
4576
  *
4574
4577
  * @ngModule RouterModule
4575
4578
  *
4576
- *
4579
+ * @publicApi
4577
4580
  */
4578
4581
  var RouterLinkActive = /** @class */ (function () {
4579
4582
  function RouterLinkActive(router, element, renderer, cdr) {
@@ -4674,7 +4677,7 @@ var RouterLinkActive = /** @class */ (function () {
4674
4677
  /**
4675
4678
  * Store contextual information about a `RouterOutlet`
4676
4679
  *
4677
- *
4680
+ * @publicApi
4678
4681
  */
4679
4682
  var OutletContext = /** @class */ (function () {
4680
4683
  function OutletContext() {
@@ -4689,7 +4692,7 @@ var OutletContext = /** @class */ (function () {
4689
4692
  /**
4690
4693
  * Store contextual information about the children (= nested) `RouterOutlet`
4691
4694
  *
4692
- *
4695
+ * @publicApi
4693
4696
  */
4694
4697
  var ChildrenOutletContexts = /** @class */ (function () {
4695
4698
  function ChildrenOutletContexts() {
@@ -4763,7 +4766,7 @@ var ChildrenOutletContexts = /** @class */ (function () {
4763
4766
  * ```
4764
4767
  * @ngModule RouterModule
4765
4768
  *
4766
- *
4769
+ * @publicApi
4767
4770
  */
4768
4771
  var RouterOutlet = /** @class */ (function () {
4769
4772
  function RouterOutlet(parentContexts, location, resolver, name, changeDetector) {
@@ -4921,7 +4924,7 @@ var OutletInjector = /** @class */ (function () {
4921
4924
  *
4922
4925
  * Provides a preloading strategy.
4923
4926
  *
4924
- * @experimental
4927
+ * @publicApi
4925
4928
  */
4926
4929
  var PreloadingStrategy = /** @class */ (function () {
4927
4930
  function PreloadingStrategy() {
@@ -4937,7 +4940,7 @@ var PreloadingStrategy = /** @class */ (function () {
4937
4940
  * RouteModule.forRoot(ROUTES, {preloadingStrategy: PreloadAllModules})
4938
4941
  * ```
4939
4942
  *
4940
- * @experimental
4943
+ * @publicApi
4941
4944
  */
4942
4945
  var PreloadAllModules = /** @class */ (function () {
4943
4946
  function PreloadAllModules() {
@@ -4954,7 +4957,7 @@ var PreloadAllModules = /** @class */ (function () {
4954
4957
  *
4955
4958
  * This strategy is enabled by default.
4956
4959
  *
4957
- * @experimental
4960
+ * @publicApi
4958
4961
  */
4959
4962
  var NoPreloading = /** @class */ (function () {
4960
4963
  function NoPreloading() {
@@ -4972,7 +4975,7 @@ var NoPreloading = /** @class */ (function () {
4972
4975
  *
4973
4976
  * If a route is protected by `canLoad` guards, the preloaded will not load it.
4974
4977
  *
4975
- *
4978
+ * @publicApi
4976
4979
  */
4977
4980
  var RouterPreloader = /** @class */ (function () {
4978
4981
  function RouterPreloader(router, moduleLoader, compiler, injector, preloadingStrategy) {
@@ -5152,7 +5155,7 @@ var ROUTER_DIRECTIVES = [RouterOutlet, RouterLink, RouterLinkWithHref, RouterLin
5152
5155
  *
5153
5156
  * Is used in DI to configure the router.
5154
5157
  *
5155
- *
5158
+ * @publicApi
5156
5159
  */
5157
5160
  var ROUTER_CONFIGURATION = new InjectionToken('ROUTER_CONFIGURATION');
5158
5161
  /**
@@ -5231,7 +5234,7 @@ function routerNgProbeToken() {
5231
5234
  * [Read this developer guide](https://angular.io/docs/ts/latest/guide/router.html) to get an
5232
5235
  * overview of how the router should be used.
5233
5236
  *
5234
- *
5237
+ * @publicApi
5235
5238
  */
5236
5239
  var RouterModule = /** @class */ (function () {
5237
5240
  // Note: We are injecting the Router so it gets created eagerly...
@@ -5339,7 +5342,7 @@ function provideForRootGuard(router) {
5339
5342
  * class MyNgModule {}
5340
5343
  * ```
5341
5344
  *
5342
- *
5345
+ * @publicApi
5343
5346
  */
5344
5347
  function provideRoutes(routes) {
5345
5348
  return [
@@ -5484,7 +5487,7 @@ function getBootstrapListener(r) {
5484
5487
  /**
5485
5488
  * A token for the router initializer that will be called after the app is bootstrapped.
5486
5489
  *
5487
- * @experimental
5490
+ * @publicApi
5488
5491
  */
5489
5492
  var ROUTER_INITIALIZER = new InjectionToken('Router Initializer');
5490
5493
  function provideRouterInitializer() {
@@ -5508,7 +5511,10 @@ function provideRouterInitializer() {
5508
5511
  * Use of this source code is governed by an MIT-style license that can be
5509
5512
  * found in the LICENSE file at https://angular.io/license
5510
5513
  */
5511
- var VERSION = new Version('7.0.0-rc.1');
5514
+ /**
5515
+ * @publicApi
5516
+ */
5517
+ var VERSION = new Version('7.0.3');
5512
5518
 
5513
5519
  /**
5514
5520
  * @license