@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.
- package/bundles/router-testing.umd.js +1 -1
- package/bundles/router-upgrade.umd.js +11 -22
- package/bundles/router-upgrade.umd.min.js +2 -2
- package/bundles/router.umd.js +155 -25
- package/bundles/router.umd.min.js +4 -4
- package/package.json +4 -4
- package/src/interfaces.d.ts +10 -10
- package/src/interfaces.js.map +1 -1
- package/src/router.d.ts +1 -1
- package/src/router.js +36 -4
- package/src/router.js.map +1 -1
- package/src/router_config_loader.js +9 -3
- package/src/router_config_loader.js.map +1 -1
- package/src/router_module.d.ts +57 -6
- package/src/router_module.js +135 -18
- package/src/router_module.js.map +1 -1
- package/src/router_module.metadata.json +1 -1
- package/src/router_preloader.js +1 -1
- package/src/router_preloader.js.map +1 -1
- package/src/version.js +1 -1
- package/src/version.js.map +1 -1
- package/src/version.metadata.json +1 -1
- package/upgrade.d.ts +4 -4
- package/upgrade.js +11 -22
- package/upgrade.js.map +1 -1
- package/upgrade.metadata.json +1 -1
package/src/version.js.map
CHANGED
|
@@ -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.
|
|
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.
|
|
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 {
|
|
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
|
-
|
|
37
|
-
|
|
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 {
|
|
9
|
-
import {
|
|
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:
|
|
36
|
-
|
|
37
|
-
|
|
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
|
|
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,
|
|
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"]}
|
package/upgrade.metadata.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"__symbolic":"module","version":3,"metadata":{"RouterUpgradeInitializer":{"provide":{"__symbolic":"reference","module":"@angular/
|
|
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"}}}]
|