How to bind to checkbox change/click event with Angular?

Today, We want to share with you How to bind to checkbox change/click event with Angular?.In this post we will show you Angular Checkbox Change Event Example, hear for angular input checkbox change event we will give you demo and example for implement.In this post, we will learn about call function on checkbox checked angular 6 with an example.

How to bind to checkbox change/click event with Angular?

There are the Following The simple About checkbox change event angular Full Information With Example and source code.

As I will cover this Post with live Working example to develop checkbox change event in angular 9, so the checkbox change event in angular is used for this example is following below.

Step 1: Import FormsModule


import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';

import { AppComponent } from './app.component';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';

declarations: [
imports: [
providers: [],
bootstrap: [AppComponent]
export class AppModule { }

Step 2: Form with ngModel


<div class="container dsp">
<h1>Angularjs CheckBox Example -</h1>
<div class="form-group"><label for="bloglist">Website:</label>
<input id="" type="checkbox" value="" />
<button class="btn btn-primary" disabled="disabled" form="" type="submit">Submit</button>


Step 3: updated Ts File


import { Component } from '@angular/core';
import { FormBuilder, FormGroup, FormControl, Validators, FormArray} from '@angular/forms';

selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
export class AppComponent {

form: FormGroup;
bloglistList: any = [
{ id: 1, name: '' },
{ id: 2, name: '' },
{ id: 3, name: '' }

constructor(private formBuilder: FormBuilder) {
this.form ={
bloglist: this.formBuilder.array([], [Validators.required])

onCheckboxChange(e) {
const bloglist: FormArray = this.form.get('bloglist') as FormArray;

if ( {
bloglist.push(new FormControl(;
} else {
const index = bloglist.controls.findIndex(x => x.value ===;



Web Programming Tutorials Example with Demo

Read :


You can also read about AngularJS, ASP.NET, VueJs, PHP.

I hope you get an idea about angular checkbox change event example.
I would like to have feedback on my blog.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.

Related FAQ

Here are some more FAQ related to this Article:

  1.   How to parseInt() Function convert a string to an integer in javascript?
  2.   Laravel 6 Delete and soft delete Examples
  3.   PHP Ajax Form Validation without page refresh
  4.   PHP Multi languageSupport To Website Management
  5.   Angular 6 Components Tutorial with Examples
  6.   Angular check ngIf Array is Empty/isset/Null
  7.   Registration Form Validation using Ajax in Codeigniter
  8.   jquery Drag and Drop draggable droppable Example
  9.   Laravel PHP Artisan Commands list with Example
  10.   WooCommerce Get Product Variations