@angular/upgrade 16.2.0-next.1 → 16.2.0-next.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.
- package/esm2022/src/common/src/downgrade_component.mjs +6 -1
- package/esm2022/src/common/src/downgrade_component_adapter.mjs +3 -2
- package/esm2022/src/common/src/version.mjs +1 -1
- package/esm2022/src/dynamic/src/upgrade_ng1_adapter.mjs +3 -3
- package/esm2022/static/src/upgrade_component.mjs +3 -3
- package/esm2022/static/src/upgrade_module.mjs +4 -4
- package/esm2022/static/testing/src/create_angular_testing_module.mjs +4 -4
- package/fesm2022/static/testing.mjs +5 -5
- package/fesm2022/static.mjs +16 -10
- package/fesm2022/static.mjs.map +1 -1
- package/fesm2022/upgrade.mjs +12 -6
- package/fesm2022/upgrade.mjs.map +1 -1
- package/index.d.ts +1 -1
- package/package.json +5 -5
- package/static/index.d.ts +1 -1
- package/static/testing/index.d.ts +1 -1
package/fesm2022/upgrade.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v16.2.0-next.
|
|
2
|
+
* @license Angular v16.2.0-next.3
|
|
3
3
|
* (c) 2010-2022 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -17,7 +17,7 @@ import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
|
|
17
17
|
/**
|
|
18
18
|
* @publicApi
|
|
19
19
|
*/
|
|
20
|
-
const VERSION = new Version('16.2.0-next.
|
|
20
|
+
const VERSION = new Version('16.2.0-next.3');
|
|
21
21
|
|
|
22
22
|
function noNg() {
|
|
23
23
|
throw new Error('AngularJS v1.x is not loaded!');
|
|
@@ -436,10 +436,11 @@ class DowngradeComponentAdapter {
|
|
|
436
436
|
}
|
|
437
437
|
const emitter = componentRef.instance[output.prop];
|
|
438
438
|
if (emitter) {
|
|
439
|
-
emitter.subscribe({
|
|
439
|
+
const subscription = emitter.subscribe({
|
|
440
440
|
next: isAssignment ? (v) => setter(this.scope, v) :
|
|
441
441
|
(v) => getter(this.scope, { '$event': v })
|
|
442
442
|
});
|
|
443
|
+
componentRef.onDestroy(() => subscription.unsubscribe());
|
|
443
444
|
}
|
|
444
445
|
else {
|
|
445
446
|
throw new Error(`Missing emitter '${output.prop}' on component '${getTypeName(this.componentFactory.componentType)}'!`);
|
|
@@ -655,6 +656,11 @@ function downgradeComponent(info) {
|
|
|
655
656
|
restrict: 'E',
|
|
656
657
|
terminal: true,
|
|
657
658
|
require: [REQUIRE_INJECTOR, REQUIRE_NG_MODEL],
|
|
659
|
+
// Controller needs to be set so that `angular-component-router.js` (from beta Angular 2)
|
|
660
|
+
// configuration properties can be made available. See:
|
|
661
|
+
// See G3: javascript/angular2/angular1_router_lib.js
|
|
662
|
+
// https://github.com/angular/angular.js/blob/47bf11ee94664367a26ed8c91b9b586d3dd420f5/src/ng/compile.js#L1670-L1691.
|
|
663
|
+
controller: function () { },
|
|
658
664
|
link: (scope, element, attrs, required) => {
|
|
659
665
|
// We might have to compile the contents asynchronously, because this might have been
|
|
660
666
|
// triggered by `UpgradeNg1ComponentAdapterBuilder`, before the Angular templates have
|
|
@@ -1282,10 +1288,10 @@ class UpgradeNg1ComponentAdapter {
|
|
|
1282
1288
|
setComponentProperty(name, value) {
|
|
1283
1289
|
this.destinationObj[this.propertyMap[name]] = value;
|
|
1284
1290
|
}
|
|
1285
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.0-next.
|
|
1286
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.0-next.
|
|
1291
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.0-next.3", ngImport: i0, type: UpgradeNg1ComponentAdapter, deps: "invalid", target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1292
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.0-next.3", type: UpgradeNg1ComponentAdapter, usesOnChanges: true, ngImport: i0 }); }
|
|
1287
1293
|
}
|
|
1288
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.0-next.
|
|
1294
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.0-next.3", ngImport: i0, type: UpgradeNg1ComponentAdapter, decorators: [{
|
|
1289
1295
|
type: Directive
|
|
1290
1296
|
}], ctorParameters: function () { return [{ type: UpgradeHelper }, { type: undefined }, { type: undefined }, { type: undefined }, { type: undefined }, { type: undefined }, { type: undefined }, { type: undefined }]; } });
|
|
1291
1297
|
|