Hello. I am in the process of porting a Java application to the browser using Angular and PrimeNG. The hope is to not change the back-end while rewriting the front end. All of our checkbox fields are stored in the database as either "Y" or "N" instead of true or false. The Rest API expects to receive them as Y or N as well.
I think it makes sense to still use the checkbox in binary mode, however the goal is to have Checkbox selected if the model value = "Y" and unselected if the model value = "N". I'd rather not have to maintain both a boolean and string value for each checkbox. Is there a more seamless way to handle this?
Thanks
Checkbox with string values instead of boolean?
The binary checkbox will be done with boolean type only. So you need to maintain both types of variables.
Author,Speaker
https://twitter.com/sudheerjonna
Github: https://github.com/sudheerj
Website http://sudheerjonna.com/
___________________
Sudheer Jonna
https://twitter.com/sudheerjonna
Github: https://github.com/sudheerj
Website http://sudheerjonna.com/
___________________
Sudheer Jonna
-
- Information
-
Who is online
Users browsing this forum: No registered users and 8 guests