@angular/common 21.0.0-rc.0 → 21.0.0-rc.2
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/README.md +1 -2
- package/fesm2022/_common_module-chunk.mjs +86 -86
- package/fesm2022/_common_module-chunk.mjs.map +1 -1
- package/fesm2022/_location-chunk.mjs +16 -16
- package/fesm2022/_location-chunk.mjs.map +1 -1
- package/fesm2022/_module-chunk.mjs +54 -90
- package/fesm2022/_module-chunk.mjs.map +1 -1
- package/fesm2022/_platform_navigation-chunk.mjs +4 -4
- package/fesm2022/_platform_navigation-chunk.mjs.map +1 -1
- package/fesm2022/_xhr-chunk.mjs +1 -1
- package/fesm2022/_xhr-chunk.mjs.map +1 -1
- package/fesm2022/common.mjs +35 -25
- package/fesm2022/common.mjs.map +1 -1
- package/fesm2022/http-testing.mjs +8 -8
- package/fesm2022/http-testing.mjs.map +1 -1
- package/fesm2022/http.mjs +1 -1
- package/fesm2022/http.mjs.map +1 -1
- package/fesm2022/testing.mjs +13 -13
- package/fesm2022/testing.mjs.map +1 -1
- package/fesm2022/upgrade.mjs +5 -5
- package/fesm2022/upgrade.mjs.map +1 -1
- package/package.json +2 -2
- package/types/_common_module-chunk.d.ts +26 -1
- package/types/_module-chunk.d.ts +1 -1
- package/types/_platform_location-chunk.d.ts +1 -1
- package/types/_xhr-chunk.d.ts +1 -1
- package/types/common.d.ts +2 -1
- package/types/http-testing.d.ts +1 -1
- package/types/http.d.ts +1 -3
- package/types/testing.d.ts +1 -1
- package/types/upgrade.d.ts +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v21.0.0-rc.
|
|
2
|
+
* @license Angular v21.0.0-rc.2
|
|
3
3
|
* (c) 2010-2025 Google LLC. https://angular.dev/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -10,7 +10,7 @@ import { Injectable } from '@angular/core';
|
|
|
10
10
|
class PlatformNavigation {
|
|
11
11
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
12
12
|
minVersion: "12.0.0",
|
|
13
|
-
version: "21.0.0-rc.
|
|
13
|
+
version: "21.0.0-rc.2",
|
|
14
14
|
ngImport: i0,
|
|
15
15
|
type: PlatformNavigation,
|
|
16
16
|
deps: [],
|
|
@@ -18,7 +18,7 @@ class PlatformNavigation {
|
|
|
18
18
|
});
|
|
19
19
|
static ɵprov = i0.ɵɵngDeclareInjectable({
|
|
20
20
|
minVersion: "12.0.0",
|
|
21
|
-
version: "21.0.0-rc.
|
|
21
|
+
version: "21.0.0-rc.2",
|
|
22
22
|
ngImport: i0,
|
|
23
23
|
type: PlatformNavigation,
|
|
24
24
|
providedIn: 'platform',
|
|
@@ -27,7 +27,7 @@ class PlatformNavigation {
|
|
|
27
27
|
}
|
|
28
28
|
i0.ɵɵngDeclareClassMetadata({
|
|
29
29
|
minVersion: "12.0.0",
|
|
30
|
-
version: "21.0.0-rc.
|
|
30
|
+
version: "21.0.0-rc.2",
|
|
31
31
|
ngImport: i0,
|
|
32
32
|
type: PlatformNavigation,
|
|
33
33
|
decorators: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_platform_navigation-chunk.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"_platform_navigation-chunk.mjs","sources":["../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/packages/common/src/navigation/platform_navigation.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC 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.dev/license\n */\n\nimport {\n Injectable,\n ɵNavigateEvent as NavigateEvent,\n ɵNavigation as Navigation,\n ɵNavigationCurrentEntryChangeEvent as NavigationCurrentEntryChangeEvent,\n ɵNavigationHistoryEntry as NavigationHistoryEntry,\n ɵNavigationNavigateOptions as NavigationNavigateOptions,\n ɵNavigationOptions as NavigationOptions,\n ɵNavigationReloadOptions as NavigationReloadOptions,\n ɵNavigationResult as NavigationResult,\n ɵNavigationTransition as NavigationTransition,\n ɵNavigationUpdateCurrentEntryOptions as NavigationUpdateCurrentEntryOptions,\n} from '@angular/core';\n\n/**\n * This class wraps the platform Navigation API which allows server-specific and test\n * implementations.\n *\n * Browser support is limited, so this API may not be available in all environments,\n * may contain bugs, and is experimental.\n *\n * @experimental 21.0.0\n */\n@Injectable({providedIn: 'platform', useFactory: () => (window as any).navigation})\nexport abstract class PlatformNavigation implements Navigation {\n abstract entries(): NavigationHistoryEntry[];\n abstract currentEntry: NavigationHistoryEntry | null;\n abstract updateCurrentEntry(options: NavigationUpdateCurrentEntryOptions): void;\n abstract transition: NavigationTransition | null;\n abstract canGoBack: boolean;\n abstract canGoForward: boolean;\n abstract navigate(url: string, options?: NavigationNavigateOptions | undefined): NavigationResult;\n abstract reload(options?: NavigationReloadOptions | undefined): NavigationResult;\n abstract traverseTo(key: string, options?: NavigationOptions | undefined): NavigationResult;\n abstract back(options?: NavigationOptions | undefined): NavigationResult;\n abstract forward(options?: NavigationOptions | undefined): NavigationResult;\n abstract onnavigate: ((this: Navigation, ev: NavigateEvent) => any) | null;\n abstract onnavigatesuccess: ((this: Navigation, ev: Event) => any) | null;\n abstract onnavigateerror: ((this: Navigation, ev: ErrorEvent) => any) | null;\n abstract oncurrententrychange:\n | ((this: Navigation, ev: NavigationCurrentEntryChangeEvent) => any)\n | null;\n abstract addEventListener(type: unknown, listener: unknown, options?: unknown): void;\n abstract removeEventListener(type: unknown, listener: unknown, options?: unknown): void;\n abstract dispatchEvent(event: Event): boolean;\n}\n"],"names":["PlatformNavigation","deps","target","i0","ɵɵFactoryTarget","Injectable","providedIn","useFactory","window","navigation","decorators","args"],"mappings":";;;;;;;;;MAgCsBA,kBAAkB,CAAA;;;;;UAAlBA,kBAAkB;AAAAC,IAAAA,IAAA,EAAA,EAAA;AAAAC,IAAAA,MAAA,EAAAC,EAAA,CAAAC,eAAA,CAAAC;AAAA,GAAA,CAAA;;;;;UAAlBL,kBAAkB;AAAAM,IAAAA,UAAA,EADf,UAAU;AAAcC,IAAAA,UAAA,EAAAA,MAAOC,MAAc,CAACC;AAAU,GAAA,CAAA;;;;;;QAC3DT,kBAAkB;AAAAU,EAAAA,UAAA,EAAA,CAAA;UADvCL,UAAU;AAACM,IAAAA,IAAA,EAAA,CAAA;AAACL,MAAAA,UAAU,EAAE,UAAU;AAAEC,MAAAA,UAAU,EAAEA,MAAOC,MAAc,CAACC;KAAW;;;;;;"}
|
package/fesm2022/_xhr-chunk.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_xhr-chunk.mjs","sources":["../../../../../
|
|
1
|
+
{"version":3,"file":"_xhr-chunk.mjs","sources":["../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/packages/common/src/cookie.ts","../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/packages/common/src/xhr.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC 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.dev/license\n */\n\nexport function parseCookieValue(cookieStr: string, name: string): string | null {\n name = encodeURIComponent(name);\n for (const cookie of cookieStr.split(';')) {\n const eqIndex = cookie.indexOf('=');\n const [cookieName, cookieValue]: string[] =\n eqIndex == -1 ? [cookie, ''] : [cookie.slice(0, eqIndex), cookie.slice(eqIndex + 1)];\n if (cookieName.trim() === name) {\n return decodeURIComponent(cookieValue);\n }\n }\n return null;\n}\n","/**\n * @license\n * Copyright Google LLC 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.dev/license\n */\n\n/**\n * A wrapper around the `XMLHttpRequest` constructor.\n *\n * @publicApi\n */\nexport abstract class XhrFactory {\n abstract build(): XMLHttpRequest;\n}\n"],"names":["parseCookieValue","cookieStr","name","encodeURIComponent","cookie","split","eqIndex","indexOf","cookieName","cookieValue","slice","trim","decodeURIComponent","XhrFactory"],"mappings":";;;;;;AAQgB,SAAAA,gBAAgBA,CAACC,SAAiB,EAAEC,IAAY,EAAA;AAC9DA,EAAAA,IAAI,GAAGC,kBAAkB,CAACD,IAAI,CAAC;EAC/B,KAAK,MAAME,MAAM,IAAIH,SAAS,CAACI,KAAK,CAAC,GAAG,CAAC,EAAE;AACzC,IAAA,MAAMC,OAAO,GAAGF,MAAM,CAACG,OAAO,CAAC,GAAG,CAAC;AACnC,IAAA,MAAM,CAACC,UAAU,EAAEC,WAAW,CAAC,GAC7BH,OAAO,IAAI,CAAC,CAAC,GAAG,CAACF,MAAM,EAAE,EAAE,CAAC,GAAG,CAACA,MAAM,CAACM,KAAK,CAAC,CAAC,EAAEJ,OAAO,CAAC,EAAEF,MAAM,CAACM,KAAK,CAACJ,OAAO,GAAG,CAAC,CAAC,CAAC;AACtF,IAAA,IAAIE,UAAU,CAACG,IAAI,EAAE,KAAKT,IAAI,EAAE;MAC9B,OAAOU,kBAAkB,CAACH,WAAW,CAAC;AACxC;AACF;AACA,EAAA,OAAO,IAAI;AACb;;MCNsBI,UAAU,CAAA;;;;"}
|
package/fesm2022/common.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v21.0.0-rc.
|
|
2
|
+
* @license Angular v21.0.0-rc.2
|
|
3
3
|
* (c) 2010-2025 Google LLC. https://angular.dev/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -62,7 +62,7 @@ class NavigationAdapterForLocation extends Location {
|
|
|
62
62
|
}
|
|
63
63
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
64
64
|
minVersion: "12.0.0",
|
|
65
|
-
version: "21.0.0-rc.
|
|
65
|
+
version: "21.0.0-rc.2",
|
|
66
66
|
ngImport: i0,
|
|
67
67
|
type: NavigationAdapterForLocation,
|
|
68
68
|
deps: [],
|
|
@@ -70,14 +70,14 @@ class NavigationAdapterForLocation extends Location {
|
|
|
70
70
|
});
|
|
71
71
|
static ɵprov = i0.ɵɵngDeclareInjectable({
|
|
72
72
|
minVersion: "12.0.0",
|
|
73
|
-
version: "21.0.0-rc.
|
|
73
|
+
version: "21.0.0-rc.2",
|
|
74
74
|
ngImport: i0,
|
|
75
75
|
type: NavigationAdapterForLocation
|
|
76
76
|
});
|
|
77
77
|
}
|
|
78
78
|
i0.ɵɵngDeclareClassMetadata({
|
|
79
79
|
minVersion: "12.0.0",
|
|
80
|
-
version: "21.0.0-rc.
|
|
80
|
+
version: "21.0.0-rc.2",
|
|
81
81
|
ngImport: i0,
|
|
82
82
|
type: NavigationAdapterForLocation,
|
|
83
83
|
decorators: [{
|
|
@@ -99,7 +99,7 @@ function isPlatformServer(platformId) {
|
|
|
99
99
|
return platformId === PLATFORM_SERVER_ID;
|
|
100
100
|
}
|
|
101
101
|
|
|
102
|
-
const VERSION = new Version('21.0.0-rc.
|
|
102
|
+
const VERSION = /* @__PURE__ */new Version('21.0.0-rc.2');
|
|
103
103
|
|
|
104
104
|
class ViewportScroller {
|
|
105
105
|
static ɵprov =
|
|
@@ -224,7 +224,6 @@ function normalizeSrc(src) {
|
|
|
224
224
|
|
|
225
225
|
const noopImageLoader = config => config.src;
|
|
226
226
|
const IMAGE_LOADER = new InjectionToken(typeof ngDevMode !== undefined && ngDevMode ? 'ImageLoader' : '', {
|
|
227
|
-
providedIn: 'root',
|
|
228
227
|
factory: () => noopImageLoader
|
|
229
228
|
});
|
|
230
229
|
function createImageLoader(buildUrlFn, exampleUrls) {
|
|
@@ -464,7 +463,7 @@ class LCPImageObserver {
|
|
|
464
463
|
}
|
|
465
464
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
466
465
|
minVersion: "12.0.0",
|
|
467
|
-
version: "21.0.0-rc.
|
|
466
|
+
version: "21.0.0-rc.2",
|
|
468
467
|
ngImport: i0,
|
|
469
468
|
type: LCPImageObserver,
|
|
470
469
|
deps: [],
|
|
@@ -472,7 +471,7 @@ class LCPImageObserver {
|
|
|
472
471
|
});
|
|
473
472
|
static ɵprov = i0.ɵɵngDeclareInjectable({
|
|
474
473
|
minVersion: "12.0.0",
|
|
475
|
-
version: "21.0.0-rc.
|
|
474
|
+
version: "21.0.0-rc.2",
|
|
476
475
|
ngImport: i0,
|
|
477
476
|
type: LCPImageObserver,
|
|
478
477
|
providedIn: 'root'
|
|
@@ -480,7 +479,7 @@ class LCPImageObserver {
|
|
|
480
479
|
}
|
|
481
480
|
i0.ɵɵngDeclareClassMetadata({
|
|
482
481
|
minVersion: "12.0.0",
|
|
483
|
-
version: "21.0.0-rc.
|
|
482
|
+
version: "21.0.0-rc.2",
|
|
484
483
|
ngImport: i0,
|
|
485
484
|
type: LCPImageObserver,
|
|
486
485
|
decorators: [{
|
|
@@ -551,7 +550,7 @@ class PreconnectLinkChecker {
|
|
|
551
550
|
}
|
|
552
551
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
553
552
|
minVersion: "12.0.0",
|
|
554
|
-
version: "21.0.0-rc.
|
|
553
|
+
version: "21.0.0-rc.2",
|
|
555
554
|
ngImport: i0,
|
|
556
555
|
type: PreconnectLinkChecker,
|
|
557
556
|
deps: [],
|
|
@@ -559,7 +558,7 @@ class PreconnectLinkChecker {
|
|
|
559
558
|
});
|
|
560
559
|
static ɵprov = i0.ɵɵngDeclareInjectable({
|
|
561
560
|
minVersion: "12.0.0",
|
|
562
|
-
version: "21.0.0-rc.
|
|
561
|
+
version: "21.0.0-rc.2",
|
|
563
562
|
ngImport: i0,
|
|
564
563
|
type: PreconnectLinkChecker,
|
|
565
564
|
providedIn: 'root'
|
|
@@ -567,7 +566,7 @@ class PreconnectLinkChecker {
|
|
|
567
566
|
}
|
|
568
567
|
i0.ɵɵngDeclareClassMetadata({
|
|
569
568
|
minVersion: "12.0.0",
|
|
570
|
-
version: "21.0.0-rc.
|
|
569
|
+
version: "21.0.0-rc.2",
|
|
571
570
|
ngImport: i0,
|
|
572
571
|
type: PreconnectLinkChecker,
|
|
573
572
|
decorators: [{
|
|
@@ -586,7 +585,6 @@ function deepForEach(input, fn) {
|
|
|
586
585
|
|
|
587
586
|
const DEFAULT_PRELOADED_IMAGES_LIMIT = 5;
|
|
588
587
|
const PRELOADED_IMAGES = new InjectionToken(typeof ngDevMode === 'undefined' || ngDevMode ? 'NG_OPTIMIZED_PRELOADED_IMAGES' : '', {
|
|
589
|
-
providedIn: 'root',
|
|
590
588
|
factory: () => new Set()
|
|
591
589
|
});
|
|
592
590
|
|
|
@@ -618,7 +616,7 @@ class PreloadLinkCreator {
|
|
|
618
616
|
}
|
|
619
617
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
620
618
|
minVersion: "12.0.0",
|
|
621
|
-
version: "21.0.0-rc.
|
|
619
|
+
version: "21.0.0-rc.2",
|
|
622
620
|
ngImport: i0,
|
|
623
621
|
type: PreloadLinkCreator,
|
|
624
622
|
deps: [],
|
|
@@ -626,7 +624,7 @@ class PreloadLinkCreator {
|
|
|
626
624
|
});
|
|
627
625
|
static ɵprov = i0.ɵɵngDeclareInjectable({
|
|
628
626
|
minVersion: "12.0.0",
|
|
629
|
-
version: "21.0.0-rc.
|
|
627
|
+
version: "21.0.0-rc.2",
|
|
630
628
|
ngImport: i0,
|
|
631
629
|
type: PreloadLinkCreator,
|
|
632
630
|
providedIn: 'root'
|
|
@@ -634,7 +632,7 @@ class PreloadLinkCreator {
|
|
|
634
632
|
}
|
|
635
633
|
i0.ɵɵngDeclareClassMetadata({
|
|
636
634
|
minVersion: "12.0.0",
|
|
637
|
-
version: "21.0.0-rc.
|
|
635
|
+
version: "21.0.0-rc.2",
|
|
638
636
|
ngImport: i0,
|
|
639
637
|
type: PreloadLinkCreator,
|
|
640
638
|
decorators: [{
|
|
@@ -668,6 +666,7 @@ class NgOptimizedImage {
|
|
|
668
666
|
renderer = inject(Renderer2);
|
|
669
667
|
imgElement = inject(ElementRef).nativeElement;
|
|
670
668
|
injector = inject(Injector);
|
|
669
|
+
destroyRef = inject(DestroyRef);
|
|
671
670
|
lcpObserver;
|
|
672
671
|
_renderedSrc = null;
|
|
673
672
|
ngSrc;
|
|
@@ -688,8 +687,7 @@ class NgOptimizedImage {
|
|
|
688
687
|
constructor() {
|
|
689
688
|
if (ngDevMode) {
|
|
690
689
|
this.lcpObserver = this.injector.get(LCPImageObserver);
|
|
691
|
-
|
|
692
|
-
destroyRef.onDestroy(() => {
|
|
690
|
+
this.destroyRef.onDestroy(() => {
|
|
693
691
|
if (!this.priority && this._renderedSrc !== null) {
|
|
694
692
|
this.lcpObserver.unregisterImage(this._renderedSrc);
|
|
695
693
|
}
|
|
@@ -710,7 +708,7 @@ class NgOptimizedImage {
|
|
|
710
708
|
assertNotBlobUrl(this);
|
|
711
709
|
if (this.fill) {
|
|
712
710
|
assertEmptyWidthAndHeight(this);
|
|
713
|
-
ngZone.runOutsideAngular(() => assertNonZeroRenderedHeight(this, this.imgElement, this.renderer));
|
|
711
|
+
ngZone.runOutsideAngular(() => assertNonZeroRenderedHeight(this, this.imgElement, this.renderer, this.destroyRef));
|
|
714
712
|
} else {
|
|
715
713
|
assertNonEmptyWidthAndHeight(this);
|
|
716
714
|
if (this.height !== undefined) {
|
|
@@ -719,7 +717,7 @@ class NgOptimizedImage {
|
|
|
719
717
|
if (this.width !== undefined) {
|
|
720
718
|
assertGreaterThanZero(this, this.width, 'width');
|
|
721
719
|
}
|
|
722
|
-
ngZone.runOutsideAngular(() => assertNoImageDistortion(this, this.imgElement, this.renderer));
|
|
720
|
+
ngZone.runOutsideAngular(() => assertNoImageDistortion(this, this.imgElement, this.renderer, this.destroyRef));
|
|
723
721
|
}
|
|
724
722
|
assertValidLoadingInput(this);
|
|
725
723
|
assertValidDecodingInput(this);
|
|
@@ -922,6 +920,10 @@ class NgOptimizedImage {
|
|
|
922
920
|
};
|
|
923
921
|
const removeLoadListenerFn = this.renderer.listen(img, 'load', callback);
|
|
924
922
|
const removeErrorListenerFn = this.renderer.listen(img, 'error', callback);
|
|
923
|
+
this.destroyRef.onDestroy(() => {
|
|
924
|
+
removeLoadListenerFn();
|
|
925
|
+
removeErrorListenerFn();
|
|
926
|
+
});
|
|
925
927
|
callOnLoadIfImageIsLoaded(img, callback);
|
|
926
928
|
}
|
|
927
929
|
setHostAttribute(name, value) {
|
|
@@ -929,7 +931,7 @@ class NgOptimizedImage {
|
|
|
929
931
|
}
|
|
930
932
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
931
933
|
minVersion: "12.0.0",
|
|
932
|
-
version: "21.0.0-rc.
|
|
934
|
+
version: "21.0.0-rc.2",
|
|
933
935
|
ngImport: i0,
|
|
934
936
|
type: NgOptimizedImage,
|
|
935
937
|
deps: [],
|
|
@@ -937,7 +939,7 @@ class NgOptimizedImage {
|
|
|
937
939
|
});
|
|
938
940
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
939
941
|
minVersion: "16.1.0",
|
|
940
|
-
version: "21.0.0-rc.
|
|
942
|
+
version: "21.0.0-rc.2",
|
|
941
943
|
type: NgOptimizedImage,
|
|
942
944
|
isStandalone: true,
|
|
943
945
|
selector: "img[ngSrc]",
|
|
@@ -977,7 +979,7 @@ class NgOptimizedImage {
|
|
|
977
979
|
}
|
|
978
980
|
i0.ɵɵngDeclareClassMetadata({
|
|
979
981
|
minVersion: "12.0.0",
|
|
980
|
-
version: "21.0.0-rc.
|
|
982
|
+
version: "21.0.0-rc.2",
|
|
981
983
|
ngImport: i0,
|
|
982
984
|
type: NgOptimizedImage,
|
|
983
985
|
decorators: [{
|
|
@@ -1187,7 +1189,7 @@ function assertGreaterThanZero(dir, inputValue, inputName) {
|
|
|
1187
1189
|
throw new _RuntimeError(2952, `${imgDirectiveDetails(dir.ngSrc)} \`${inputName}\` has an invalid value. ` + `To fix this, provide \`${inputName}\` as a number greater than 0.`);
|
|
1188
1190
|
}
|
|
1189
1191
|
}
|
|
1190
|
-
function assertNoImageDistortion(dir, img, renderer) {
|
|
1192
|
+
function assertNoImageDistortion(dir, img, renderer, destroyRef) {
|
|
1191
1193
|
const callback = () => {
|
|
1192
1194
|
removeLoadListenerFn();
|
|
1193
1195
|
removeErrorListenerFn();
|
|
@@ -1232,6 +1234,10 @@ function assertNoImageDistortion(dir, img, renderer) {
|
|
|
1232
1234
|
removeLoadListenerFn();
|
|
1233
1235
|
removeErrorListenerFn();
|
|
1234
1236
|
});
|
|
1237
|
+
destroyRef.onDestroy(() => {
|
|
1238
|
+
removeLoadListenerFn();
|
|
1239
|
+
removeErrorListenerFn();
|
|
1240
|
+
});
|
|
1235
1241
|
callOnLoadIfImageIsLoaded(img, callback);
|
|
1236
1242
|
}
|
|
1237
1243
|
function assertNonEmptyWidthAndHeight(dir) {
|
|
@@ -1247,7 +1253,7 @@ function assertEmptyWidthAndHeight(dir) {
|
|
|
1247
1253
|
throw new _RuntimeError(2952, `${imgDirectiveDetails(dir.ngSrc)} the attributes \`height\` and/or \`width\` are present ` + `along with the \`fill\` attribute. Because \`fill\` mode causes an image to fill its containing ` + `element, the size attributes have no effect and should be removed.`);
|
|
1248
1254
|
}
|
|
1249
1255
|
}
|
|
1250
|
-
function assertNonZeroRenderedHeight(dir, img, renderer) {
|
|
1256
|
+
function assertNonZeroRenderedHeight(dir, img, renderer, destroyRef) {
|
|
1251
1257
|
const callback = () => {
|
|
1252
1258
|
removeLoadListenerFn();
|
|
1253
1259
|
removeErrorListenerFn();
|
|
@@ -1261,6 +1267,10 @@ function assertNonZeroRenderedHeight(dir, img, renderer) {
|
|
|
1261
1267
|
removeLoadListenerFn();
|
|
1262
1268
|
removeErrorListenerFn();
|
|
1263
1269
|
});
|
|
1270
|
+
destroyRef.onDestroy(() => {
|
|
1271
|
+
removeLoadListenerFn();
|
|
1272
|
+
removeErrorListenerFn();
|
|
1273
|
+
});
|
|
1264
1274
|
callOnLoadIfImageIsLoaded(img, callback);
|
|
1265
1275
|
}
|
|
1266
1276
|
function assertValidLoadingInput(dir) {
|