• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

IgniteUI / igniteui-angular / 16053471080

03 Jul 2025 02:41PM UTC coverage: 4.981% (-86.4%) from 91.409%
16053471080

Pull #16021

github

web-flow
Merge 7c49966eb into 7e40671a1
Pull Request #16021: fix(radio-group): dynamically added radio buttons do not initialize

178 of 15753 branches covered (1.13%)

13 of 14 new or added lines in 2 files covered. (92.86%)

25644 existing lines in 324 files now uncovered.

1478 of 29670 relevant lines covered (4.98%)

0.51 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

7.14
/projects/igniteui-angular/src/lib/checkbox/checkbox.component.ts
1
import {
2
    Component,
3
    HostBinding,
4
    Input,
5
    AfterViewInit,
6
    booleanAttribute,
7
} from '@angular/core';
8
import { IgxRippleDirective } from '../directives/ripple/ripple.directive';
9
import { CheckboxBaseDirective } from './checkbox-base.directive';
10
import { ControlValueAccessor } from '@angular/forms';
11
import { EditorProvider, EDITOR_PROVIDER } from '../core/edit-provider';
12

13
/**
14
 * Allows users to make a binary choice for a certain condition.
15
 *
16
 * @igxModule IgxCheckboxModule
17
 *
18
 * @igxTheme igx-checkbox-theme
19
 *
20
 * @igxKeywords checkbox, label
21
 *
22
 * @igxGroup Data entry and display
23
 *
24
 * @remarks
25
 * The Ignite UI Checkbox is a selection control that allows users to make a binary choice for a certain condition.It behaves similarly
26
 * to the native browser checkbox.
27
 *
28
 * @example
29
 * ```html
30
 * <igx-checkbox [checked]="true">
31
 *   simple checkbox
32
 * </igx-checkbox>
33
 * ```
34
 */
35
@Component({
36
    selector: 'igx-checkbox',
37
    providers: [
38
        {
39
            provide: EDITOR_PROVIDER,
40
            useExisting: IgxCheckboxComponent,
41
            multi: true,
42
        },
43
    ],
44
    preserveWhitespaces: false,
45
    templateUrl: 'checkbox.component.html',
46
    imports: [IgxRippleDirective],
47
})
48
export class IgxCheckboxComponent
3✔
49
    extends CheckboxBaseDirective
50
    implements AfterViewInit, ControlValueAccessor, EditorProvider {
51
    /**
52
     * Returns the class of the checkbox component.
53
     *
54
     * @example
55
     * ```typescript
56
     * let class = this.checkbox.cssClass;
57
     * ```
58
     */
59
    @HostBinding('class.igx-checkbox')
UNCOV
60
    public override cssClass = 'igx-checkbox';
×
61

62
    /**
63
     * Returns if the component is of type `material`.
64
     *
65
     * @example
66
     * ```typescript
67
     * let checkbox = this.checkbox.material;
68
     * ```
69
     */
70
    @HostBinding('class.igx-checkbox--material')
71
    protected get material() {
UNCOV
72
        return this.theme === 'material';
×
73
    }
74

75
    /**
76
     * Returns if the component is of type `indigo`.
77
     *
78
     * @example
79
     * ```typescript
80
     * let checkbox = this.checkbox.indigo;
81
     * ```
82
     */
83
    @HostBinding('class.igx-checkbox--indigo')
84
    protected get indigo() {
UNCOV
85
        return this.theme === 'indigo';
×
86
    }
87

88
    /**
89
     * Returns if the component is of type `bootstrap`.
90
     *
91
     * @example
92
     * ```typescript
93
     * let checkbox = this.checkbox.bootstrap;
94
     * ```
95
     */
96
    @HostBinding('class.igx-checkbox--bootstrap')
97
    protected get bootstrap() {
UNCOV
98
        return this.theme === 'bootstrap';
×
99
    }
100

101
    /**
102
     * Returns if the component is of type `fluent`.
103
     *
104
     * @example
105
     * ```typescript
106
     * let checkbox = this.checkbox.fluent;
107
     * ```
108
     */
109
    @HostBinding('class.igx-checkbox--fluent')
110
    protected get fluent() {
UNCOV
111
        return this.theme === 'fluent';
×
112
    }
113

114
    /**
115
     * Sets/gets whether the checkbox component is on focus.
116
     * Default value is `false`.
117
     *
118
     * @example
119
     * ```typescript
120
     * this.checkbox.focused =  true;
121
     * ```
122
     * ```typescript
123
     * let isFocused = this.checkbox.focused;
124
     * ```
125
     */
126
    @HostBinding('class.igx-checkbox--focused')
UNCOV
127
    public override focused = false;
×
128

129
    /**
130
     * Sets/gets the checkbox indeterminate visual state.
131
     * Default value is `false`;
132
     *
133
     * @example
134
     * ```html
135
     * <igx-checkbox [indeterminate]="true"></igx-checkbox>
136
     * ```
137
     * ```typescript
138
     * let isIndeterminate = this.checkbox.indeterminate;
139
     * ```
140
     */
141
    @HostBinding('class.igx-checkbox--indeterminate')
142
    @Input({ transform: booleanAttribute })
UNCOV
143
    public override indeterminate = false;
×
144

145
    /**
146
     * Sets/gets whether the checkbox is checked.
147
     * Default value is `false`.
148
     *
149
     * @example
150
     * ```html
151
     * <igx-checkbox [checked]="true"></igx-checkbox>
152
     * ```
153
     * ```typescript
154
     * let isChecked =  this.checkbox.checked;
155
     * ```
156
     */
157
    @HostBinding('class.igx-checkbox--checked')
158
    @Input({ transform: booleanAttribute })
159
    public override set checked(value: boolean) {
UNCOV
160
        super.checked = value;
×
161
    }
162
    public override get checked() {
UNCOV
163
        return super.checked;
×
164
    }
165

166
    /**
167
     * Sets/gets whether the checkbox is disabled.
168
     * Default value is `false`.
169
     *
170
     * @example
171
     * ```html
172
     * <igx-checkbox disabled></igx-checkbox>
173
     * ```
174
     * ```typescript
175
     * let isDisabled = this.checkbox.disabled;
176
     * ```
177
     */
178
    @HostBinding('class.igx-checkbox--disabled')
179
    @Input({ transform: booleanAttribute })
UNCOV
180
    public override disabled = false;
×
181

182
    /**
183
     * Sets/gets whether the checkbox is invalid.
184
     * Default value is `false`.
185
     *
186
     * @example
187
     * ```html
188
     * <igx-checkbox invalid></igx-checkbox>
189
     * ```
190
     * ```typescript
191
     * let isInvalid = this.checkbox.invalid;
192
     * ```
193
     */
194
    @HostBinding('class.igx-checkbox--invalid')
195
    @Input({ transform: booleanAttribute })
UNCOV
196
    public override invalid = false;
×
197

198
    /**
199
     * Sets/gets whether the checkbox is readonly.
200
     * Default value is `false`.
201
     *
202
     * @example
203
     * ```html
204
     * <igx-checkbox [readonly]="true"></igx-checkbox>
205
     * ```
206
     * ```typescript
207
     * let readonly = this.checkbox.readonly;
208
     * ```
209
     */
210
    @Input({ transform: booleanAttribute })
UNCOV
211
    public override readonly = false;
×
212

213
    /**
214
     * Sets/gets whether the checkbox should disable all css transitions.
215
     * Default value is `false`.
216
     *
217
     * @example
218
     * ```html
219
     * <igx-checkbox [disableTransitions]="true"></igx-checkbox>
220
     * ```
221
     * ```typescript
222
     * let disableTransitions = this.checkbox.disableTransitions;
223
     * ```
224
     */
225
    @HostBinding('class.igx-checkbox--plain')
226
    @Input({ transform: booleanAttribute })
UNCOV
227
    public disableTransitions = false;
×
228
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc