We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 06b1ba3 commit d24c136Copy full SHA for d24c136
libs/core/src/lib/directives/args.ts
@@ -9,6 +9,7 @@ import {
9
ViewContainerRef,
10
} from '@angular/core';
11
import { SPECIAL_INTERNAL_ADD_COMMENT } from '../renderer/constants';
12
+import { is } from '../utils/is';
13
14
@Directive({ selector: 'ng-template[args]' })
15
export class NgtArgs {
@@ -31,6 +32,12 @@ export class NgtArgs {
31
32
effect(() => {
33
const value = this.args();
34
if (value == null || !Array.isArray(value) || (value.length === 1 && value[0] === null)) return;
35
+
36
+ if (is.equ(value, this.injectedArgs)) {
37
+ // we have the same value as before, no need to update
38
+ return;
39
+ }
40
41
this.injected = false;
42
this.injectedArgs = value;
43
this.createView();
0 commit comments