Currently, I am working on a project using Angular and have run into an issue that I need help with:
In my project, I have two variables - signed which is a boolean bound to a checkbox, and grade which is an integer bound to a number input field.
I am looking for a way to automatically set signed to true when the value of grade becomes greater than or equal to 2. Additionally, I want grade to automatically change to "1" when signed is set to false. Currently, I am manually calling two functions to achieve this, but I am wondering if there is a more efficient solution.
Any suggestions would be greatly appreciated.
update: I forgot to mention that I have multiple subjects, each with their own signed and grade properties. It is important that changes in one subject's properties do not affect the properties of another subject.