@angular/router 3.4.6 → 3.4.10

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.
@@ -1 +1 @@
1
- {"version":3,"file":"version.js","sourceRoot":"","sources":["../../../../modules/@angular/router/src/version.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;OAQI,EAAC,OAAO,EAAC,MAAM,eAAe;AACrC;;GAEG;AACH,OAAO,IAAM,gBAAgB,CAAC,OAAO,GAAG,IAAI,OAAO,CAAC,yBAAyB,CAAC,CAAC","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\n/**\n * @module\n * @description\n * Entry point for all public APIs of the common package.\n */\n\nimport {Version} from '@angular/core';\n/**\n * @stable\n */\nexport const /** @type {?} */ VERSION = new Version('3.4.6');\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n"]}
1
+ {"version":3,"file":"version.js","sourceRoot":"","sources":["../../../../modules/@angular/router/src/version.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;OAQI,EAAC,OAAO,EAAC,MAAM,eAAe;AACrC;;GAEG;AACH,OAAO,IAAM,gBAAgB,CAAC,OAAO,GAAG,IAAI,OAAO,CAAC,yBAAyB,CAAC,CAAC","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\n/**\n * @module\n * @description\n * Entry point for all public APIs of the common package.\n */\n\nimport {Version} from '@angular/core';\n/**\n * @stable\n */\nexport const /** @type {?} */ VERSION = new Version('3.4.10');\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n"]}
@@ -1 +1 @@
1
- [{"__symbolic":"module","version":3,"metadata":{"VERSION":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"Version"},"arguments":["3.4.6"]}}},{"__symbolic":"module","version":1,"metadata":{"VERSION":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"Version"},"arguments":["3.4.6"]}}}]
1
+ [{"__symbolic":"module","version":3,"metadata":{"VERSION":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"Version"},"arguments":["3.4.10"]}}},{"__symbolic":"module","version":1,"metadata":{"VERSION":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"Version"},"arguments":["3.4.10"]}}}]
package/upgrade.d.ts CHANGED
@@ -5,8 +5,7 @@
5
5
  * Use of this source code is governed by an MIT-style license that can be
6
6
  * found in the LICENSE file at https://angular.io/license
7
7
  */
8
- import { ApplicationRef, OpaqueToken } from '@angular/core';
9
- import { ExtraOptions, RouterPreloader } from '@angular/router';
8
+ import { OpaqueToken } from '@angular/core';
10
9
  import { UpgradeModule } from '@angular/upgrade/static';
11
10
  /**
12
11
  * @whatItDoes Creates an initializer that in addition to setting up the Angular 2
@@ -33,8 +32,9 @@ import { UpgradeModule } from '@angular/upgrade/static';
33
32
  */
34
33
  export declare const RouterUpgradeInitializer: {
35
34
  provide: OpaqueToken;
36
- useFactory: (ngUpgrade: UpgradeModule, ref: ApplicationRef, preloader: RouterPreloader, opts: ExtraOptions) => Function;
37
- deps: (OpaqueToken | typeof UpgradeModule | typeof ApplicationRef | typeof RouterPreloader)[];
35
+ multi: boolean;
36
+ useFactory: (ngUpgrade: UpgradeModule) => () => void;
37
+ deps: typeof UpgradeModule[];
38
38
  };
39
39
  /**
40
40
  * @whatItDoes Sets up a location synchronization.
package/upgrade.js CHANGED
@@ -5,8 +5,8 @@
5
5
  * Use of this source code is governed by an MIT-style license that can be
6
6
  * found in the LICENSE file at https://angular.io/license
7
7
  */
8
- import { ApplicationRef } from '@angular/core';
9
- import { ROUTER_CONFIGURATION, ROUTER_INITIALIZER, Router, RouterPreloader } from '@angular/router';
8
+ import { APP_BOOTSTRAP_LISTENER } from '@angular/core';
9
+ import { Router } from '@angular/router';
10
10
  import { UpgradeModule } from '@angular/upgrade/static';
11
11
  /**
12
12
  * @whatItDoes Creates an initializer that in addition to setting up the Angular 2
@@ -32,30 +32,16 @@ import { UpgradeModule } from '@angular/upgrade/static';
32
32
  * @experimental
33
33
  */
34
34
  export var RouterUpgradeInitializer = {
35
- provide: ROUTER_INITIALIZER,
36
- useFactory: initialRouterNavigation,
37
- deps: [UpgradeModule, ApplicationRef, RouterPreloader, ROUTER_CONFIGURATION]
35
+ provide: APP_BOOTSTRAP_LISTENER,
36
+ multi: true,
37
+ useFactory: locationSyncBootstrapListener,
38
+ deps: [UpgradeModule]
38
39
  };
39
40
  /**
40
41
  * @internal
41
42
  */
42
- export function initialRouterNavigation(ngUpgrade, ref, preloader, opts) {
43
- return function () {
44
- if (!ngUpgrade.$injector) {
45
- 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 ");
46
- }
47
- var router = ngUpgrade.injector.get(Router);
48
- var ref = ngUpgrade.injector.get(ApplicationRef);
49
- router.resetRootComponentType(ref.componentTypes[0]);
50
- preloader.setUpPreloading();
51
- if (opts.initialNavigation === false) {
52
- router.setUpLocationChangeListener();
53
- }
54
- else {
55
- router.initialNavigation();
56
- }
57
- setUpLocationSync(ngUpgrade);
58
- };
43
+ export function locationSyncBootstrapListener(ngUpgrade) {
44
+ return function () { setUpLocationSync(ngUpgrade); };
59
45
  }
60
46
  /**
61
47
  * @whatItDoes Sets up a location synchronization.
@@ -66,6 +52,9 @@ export function initialRouterNavigation(ngUpgrade, ref, preloader, opts) {
66
52
  * @experimental
67
53
  */
68
54
  export function setUpLocationSync(ngUpgrade) {
55
+ if (!ngUpgrade.$injector) {
56
+ 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 ");
57
+ }
69
58
  var router = ngUpgrade.injector.get(Router);
70
59
  var url = document.createElement('a');
71
60
  ngUpgrade.$injector.get('$rootScope')
package/upgrade.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"upgrade.js","sourceRoot":"","sources":["../../../modules/@angular/router/upgrade.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;OAEI,EAAyB,cAAc,EAAc,MAAM,eAAe;OAC1E,EAAe,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,EAAE,eAAe,EAAC,MAAM,iBAAiB;OACxG,EAAC,aAAa,EAAC,MAAM,yBAAyB;AAGrD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,OAAO,IAAM,wBAAwB,GAAG;IACtC,OAAO,EAAE,kBAAkB;IAC3B,UAAU,EAAE,uBAAuB;IACnC,IAAI,EAAE,CAAC,aAAa,EAAE,cAAc,EAAE,eAAe,EAAE,oBAAoB,CAAC;CAC7E,CAAC;AAEF;;GAEG;AACH,wCACI,SAAwB,EAAE,GAAmB,EAAE,SAA0B,EACzE,IAAkB;IACpB,MAAM,CAAC;QACL,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC;YACzB,MAAM,IAAI,KAAK,CAAC,+MAGf,CAAC,CAAC;QACL,CAAC;QAED,IAAM,MAAM,GAAG,SAAS,CAAC,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;QAC9C,IAAM,GAAG,GAAG,SAAS,CAAC,QAAQ,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;QAEnD,MAAM,CAAC,sBAAsB,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC;QACrD,SAAS,CAAC,eAAe,EAAE,CAAC;QAC5B,EAAE,CAAC,CAAC,IAAI,CAAC,iBAAiB,KAAK,KAAK,CAAC,CAAC,CAAC;YACrC,MAAM,CAAC,2BAA2B,EAAE,CAAC;QACvC,CAAC;QAAC,IAAI,CAAC,CAAC;YACN,MAAM,CAAC,iBAAiB,EAAE,CAAC;QAC7B,CAAC;QAED,iBAAiB,CAAC,SAAS,CAAC,CAAC;IAC/B,CAAC,CAAC;AACJ,CAAC;AAED;;;;;;;GAOG;AACH,kCAAkC,SAAwB;IACxD,IAAM,MAAM,GAAW,SAAS,CAAC,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtD,IAAM,GAAG,GAAG,QAAQ,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;IAExC,SAAS,CAAC,SAAS,CAAC,GAAG,CAAC,YAAY,CAAC;SAChC,GAAG,CAAC,sBAAsB,EAAE,UAAC,CAAM,EAAE,IAAY,EAAE,EAAU;QAC5D,GAAG,CAAC,IAAI,GAAG,IAAI,CAAC;QAChB,MAAM,CAAC,aAAa,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IACrC,CAAC,CAAC,CAAC;AACT,CAAC","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 {APP_BOOTSTRAP_LISTENER, ApplicationRef, OpaqueToken} from '@angular/core';\nimport {ExtraOptions, ROUTER_CONFIGURATION, ROUTER_INITIALIZER, Router, RouterPreloader} from '@angular/router';\nimport {UpgradeModule} from '@angular/upgrade/static';\n\n\n/**\n * @whatItDoes Creates an initializer that in addition to setting up the Angular 2\n * router sets up the ngRoute integration.\n *\n * @howToUse\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: ROUTER_INITIALIZER,\n useFactory: initialRouterNavigation,\n deps: [UpgradeModule, ApplicationRef, RouterPreloader, ROUTER_CONFIGURATION]\n};\n\n/**\n * @internal\n */\nexport function initialRouterNavigation(\n ngUpgrade: UpgradeModule, ref: ApplicationRef, preloader: RouterPreloader,\n opts: ExtraOptions): Function {\n return () => {\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 = ngUpgrade.injector.get(Router);\n const ref = ngUpgrade.injector.get(ApplicationRef);\n\n router.resetRootComponentType(ref.componentTypes[0]);\n preloader.setUpPreloading();\n if (opts.initialNavigation === false) {\n router.setUpLocationChangeListener();\n } else {\n router.initialNavigation();\n }\n\n setUpLocationSync(ngUpgrade);\n };\n}\n\n/**\n * @whatItDoes Sets up a location synchronization.\n *\n * History.pushState does not fire onPopState, so the angular2 location\n * doesn't detect it. The workaround is to attach a location change listener\n *\n * @experimental\n */\nexport function setUpLocationSync(ngUpgrade: UpgradeModule): void {\n const router: Router = ngUpgrade.injector.get(Router);\n const url = document.createElement('a');\n\n ngUpgrade.$injector.get('$rootScope')\n .$on('$locationChangeStart', (_: any, next: string, __: string) => {\n url.href = next;\n router.navigateByUrl(url.pathname);\n });\n}\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n"]}
1
+ {"version":3,"file":"upgrade.js","sourceRoot":"","sources":["../../../modules/@angular/router/upgrade.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;OAEI,EAAC,sBAAsB,EAA4B,MAAM,eAAe;OACxE,EAAC,MAAM,EAAC,MAAM,iBAAiB;OAC/B,EAAC,aAAa,EAAC,MAAM,yBAAyB;AAGrD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,OAAO,IAAM,wBAAwB,GAAG;IACtC,OAAO,EAAE,sBAAsB;IAC/B,KAAK,EAAE,IAAI;IACX,UAAU,EAAE,6BAA6B;IACzC,IAAI,EAAE,CAAC,aAAa,CAAC;CACtB,CAAC;AAEF;;GAEG;AACH,8CAA8C,SAAwB;IACpE,MAAM,CAAC,cAAQ,iBAAiB,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC;AACjD,CAAC;AAED;;;;;;;GAOG;AACH,kCAAkC,SAAwB;IACxD,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC;QACzB,MAAM,IAAI,KAAK,CAAC,+MAGb,CAAC,CAAC;IACP,CAAC;IAED,IAAM,MAAM,GAAW,SAAS,CAAC,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtD,IAAM,GAAG,GAAG,QAAQ,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;IAExC,SAAS,CAAC,SAAS,CAAC,GAAG,CAAC,YAAY,CAAC;SAChC,GAAG,CAAC,sBAAsB,EAAE,UAAC,CAAM,EAAE,IAAY,EAAE,EAAU;QAC5D,GAAG,CAAC,IAAI,GAAG,IAAI,CAAC;QAChB,MAAM,CAAC,aAAa,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IACrC,CAAC,CAAC,CAAC;AACT,CAAC","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 {APP_BOOTSTRAP_LISTENER, ComponentRef, OpaqueToken} from '@angular/core';\nimport {Router} from '@angular/router';\nimport {UpgradeModule} from '@angular/upgrade/static';\n\n\n/**\n * @whatItDoes Creates an initializer that in addition to setting up the Angular 2\n * router sets up the ngRoute integration.\n *\n * @howToUse\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,\n deps: [UpgradeModule]\n};\n\n/**\n * @internal\n */\nexport function locationSyncBootstrapListener(ngUpgrade: UpgradeModule) {\n return () => { setUpLocationSync(ngUpgrade); };\n}\n\n/**\n * @whatItDoes Sets up a location synchronization.\n *\n * History.pushState does not fire onPopState, so the angular2 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 url = document.createElement('a');\n\n ngUpgrade.$injector.get('$rootScope')\n .$on('$locationChangeStart', (_: any, next: string, __: string) => {\n url.href = next;\n router.navigateByUrl(url.pathname);\n });\n}\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n"]}
@@ -1 +1 @@
1
- [{"__symbolic":"module","version":3,"metadata":{"RouterUpgradeInitializer":{"provide":{"__symbolic":"reference","module":"@angular/router","name":"ROUTER_INITIALIZER"},"useFactory":{"__symbolic":"reference","name":"initialRouterNavigation"},"deps":[{"__symbolic":"reference","module":"@angular/upgrade/static","name":"UpgradeModule"},{"__symbolic":"reference","module":"@angular/core","name":"ApplicationRef"},{"__symbolic":"reference","module":"@angular/router","name":"RouterPreloader"},{"__symbolic":"reference","module":"@angular/router","name":"ROUTER_CONFIGURATION"}]},"initialRouterNavigation":{"__symbolic":"function","parameters":["ngUpgrade","ref","preloader","opts"],"value":{"__symbolic":"error","message":"Function call not supported","line":48,"character":9}},"setUpLocationSync":{"__symbolic":"function"}}},{"__symbolic":"module","version":1,"metadata":{"RouterUpgradeInitializer":{"provide":{"__symbolic":"reference","module":"@angular/router","name":"ROUTER_INITIALIZER"},"useFactory":{"__symbolic":"reference","name":"initialRouterNavigation"},"deps":[{"__symbolic":"reference","module":"@angular/upgrade/static","name":"UpgradeModule"},{"__symbolic":"reference","module":"@angular/core","name":"ApplicationRef"},{"__symbolic":"reference","module":"@angular/router","name":"RouterPreloader"},{"__symbolic":"reference","module":"@angular/router","name":"ROUTER_CONFIGURATION"}]},"initialRouterNavigation":{"__symbolic":"function","parameters":["ngUpgrade","ref","preloader","opts"],"value":{"__symbolic":"error","message":"Function call not supported","line":48,"character":9}},"setUpLocationSync":{"__symbolic":"function"}}}]
1
+ [{"__symbolic":"module","version":3,"metadata":{"RouterUpgradeInitializer":{"provide":{"__symbolic":"reference","module":"@angular/core","name":"APP_BOOTSTRAP_LISTENER"},"multi":true,"useFactory":{"__symbolic":"reference","name":"locationSyncBootstrapListener"},"deps":[{"__symbolic":"reference","module":"@angular/upgrade/static","name":"UpgradeModule"}]},"locationSyncBootstrapListener":{"__symbolic":"function","parameters":["ngUpgrade"],"value":{"__symbolic":"error","message":"Function call not supported","line":47,"character":9}},"setUpLocationSync":{"__symbolic":"function"}}},{"__symbolic":"module","version":1,"metadata":{"RouterUpgradeInitializer":{"provide":{"__symbolic":"reference","module":"@angular/core","name":"APP_BOOTSTRAP_LISTENER"},"multi":true,"useFactory":{"__symbolic":"reference","name":"locationSyncBootstrapListener"},"deps":[{"__symbolic":"reference","module":"@angular/upgrade/static","name":"UpgradeModule"}]},"locationSyncBootstrapListener":{"__symbolic":"function","parameters":["ngUpgrade"],"value":{"__symbolic":"error","message":"Function call not supported","line":47,"character":9}},"setUpLocationSync":{"__symbolic":"function"}}}]