79072312

Date: 2024-10-09 23:22:00
Score: 1
Natty:
Report link

Using FormGroup and FormControl, I typically get the value in the submit and set it to a model.

Submit

const model = {
    checkboxValue: +this.formGroup.controls.check.value
}

Adding a '+' to the front of a boolean value is a real handy way to convert it to a number.

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: drobbinso