on-internet
← Community

How to prevent Angular Signal references being used instead of Signal Values?

Stack Overflow ·

I am enthralled with Angular Signals, exactly what I want out of the library, but one thing that I have commonly found is that I accidentally am calling a signal reference somewhere (in a template block, or in the component somewhere) instead of calling the signal value. For example: public conditionalSignal = signal(false); ... // Accidentally using the reference: if (conditionalSignal) { ... } // Instead of something like this: if (conditionalSignal()) { ... } I was hoping someone had a ESLint plugin or Angular compiler option that they knew about that would help prevent this situation from

Comments

Sign in or sign up to comment and upvote.

No comments yet.