I’m migrating my Angular application to 17th version.
I have the following @Input set and regular @Input:
@Input() a: A;
@Input set b(val: B) {
console.log(val, this.a);
this._b = val;
this.doSomethingWithABValues();
}
Preor to migration console.log(val, a);
would log value from val
and a
normaly, and logic inside doSomethingWithABValues()
would run as expected. After migration, a
is always undefined
.
Could someone help me figure out what has changed? Why it’s working like this now? How can I bring back before migration behavior of @Input() set
?
It seems like the problem is with all @Input() set
that uses other @Inputs
on set, so I’d like some universal solution to the problem that won’t require me to rewrite all my components to signal input or etc.
alex4540 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.