Replies: 4 comments 2 replies
-
The getter shouldn't already be executed until you try to access the property. Do you have an example to demostrate that this is not the case? |
Beta Was this translation helpful? Give feedback.
-
getters will not be run until accessed. (Or at least should not). |
Beta Was this translation helpful? Give feedback.
-
Yep, yer both right. I found the problem and it was me 😖😝 Thanks guys. |
Beta Was this translation helpful? Give feedback.
-
Update, I found the issue and it is $watch. If I "watch" the component, then it triggers all the properties in the component. I am using this in the init() ... appItems is an array of objects. I guess there is no way to make certain properties un-watchable? |
Beta Was this translation helpful? Give feedback.
-
I have a getter function,
get isValid() { ... }
that I only want executed when specifically called.Right now it is getting triggered when the component is loaded.
How can I prevent this?
Beta Was this translation helpful? Give feedback.
All reactions