W3cubDocs

/Angular 10

CheckboxControlValueAccessor

directive

A ControlValueAccessor for writing a value and listening to changes on a checkbox input element.

NgModules

Selectors

Description

Using a checkbox with a reactive form.

The following example shows how to use a checkbox with a reactive form.

const rememberLoginControl = new FormControl();
<input type="checkbox" [formControl]="rememberLoginControl">

© 2010–2020 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
https://v10.angular.io/api/forms/CheckboxControlValueAccessor