In angular 12,
get variable(): string {
return this.anotherVariable + ' is done';
}
I am wondering when get
is updated. I suspected I had a racing condition which seems that if the get
is not fast enough to get the actually value of anotherVariable which is coming from a bit of complex logic related to the app initializing sequence. Sometimes, initializing failed but most of the time, it succeeded. And when fail, Variable is not being initialized.
And if I depending on the Variable, it gave me the false result because the get
is just not fast enough to respond to the change of the anotherVariable
The code is quite complex and I have to rely on variable
. But if this is potentially a possibility. I think I would have to stop depending on the get variable
.
Anyone have any idea?