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

IgniteUI / igniteui-angular / 20960087204

13 Jan 2026 02:19PM UTC coverage: 12.713% (-78.8%) from 91.5%
20960087204

Pull #16746

github

web-flow
Merge 9afce6e5d into a967f087e
Pull Request #16746: fix(csv): export summaries - master

1008 of 16803 branches covered (6.0%)

19 of 23 new or added lines in 2 files covered. (82.61%)

24693 existing lines in 336 files now uncovered.

3985 of 31345 relevant lines covered (12.71%)

2.49 hits per line

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

14.29
/projects/igniteui-angular/switch/src/switch/switch.component.ts
1
import {
2
    Component,
3
    HostBinding,
4
    Input,
5
    AfterViewInit,
6
    booleanAttribute
7
} from '@angular/core';
8
import { ControlValueAccessor } from '@angular/forms';
9
import { CheckboxBaseDirective, IgxRippleDirective } from 'igniteui-angular/directives';
10
import { EditorProvider, EDITOR_PROVIDER } from 'igniteui-angular/core';
11

12
/**
13
 *
14
 * The Switch component is a binary choice selection component.
15
 *
16
 * @igxModule IgxSwitchModule
17
 *
18
 * @igxTheme igx-switch-theme, igx-tooltip-theme
19
 *
20
 * @igxKeywords switch, states, tooltip
21
 *
22
 * @igxGroup Data Entry & Display
23
 * @remarks
24
 *
25
 * The Ignite UI Switch lets the user toggle between on/off or true/false states.
26
 *
27
 * @example
28
 * ```html
29
 * <igx-switch [checked]="true">
30
 *   Simple switch
31
 * </igx-switch>
32
 * ```
33
 */
34
@Component({
35
    providers: [{
36
        provide: EDITOR_PROVIDER,
37
        useExisting: IgxSwitchComponent,
38
        multi: true
39
    }],
40
    selector: 'igx-switch',
41
    templateUrl: 'switch.component.html',
42
    imports: [IgxRippleDirective]
43
})
44
export class IgxSwitchComponent
3✔
45
    extends CheckboxBaseDirective
46
    implements ControlValueAccessor, EditorProvider, AfterViewInit {
47
    /**
48
     * Returns the class of the switch component.
49
     *
50
     * @example
51
     * ```typescript
52
     * let switchClass = this.switch.cssClass;
53
     * ```
54
     */
55
    @HostBinding('class.igx-switch')
UNCOV
56
    public override cssClass = 'igx-switch';
×
57
    /**
58
     * Sets/gets whether the switch is on or off.
59
     * Default value is 'false'.
60
     *
61
     * @example
62
     * ```html
63
     *  <igx-switch [checked]="true"></igx-switch>
64
     * ```
65
     */
66
    @HostBinding('class.igx-switch--checked')
67
    @Input()
68
    public override set checked(value: boolean) {
UNCOV
69
        super.checked = value;
×
70
    }
71
    public override get checked() {
UNCOV
72
        return super.checked;
×
73
    }
74
    /**
75
     * Sets/gets the `disabled` attribute.
76
     * Default value is `false`.
77
     *
78
     * @example
79
     * ```html
80
     * <igx-switch disabled><igx-switch>
81
     * ```
82
     */
83
    @HostBinding('class.igx-switch--disabled')
84
    @Input({ transform: booleanAttribute })
UNCOV
85
    public override disabled = false;
×
86

87
    /**
88
     * Sets/gets whether the switch component is invalid.
89
     * Default value is `false`.
90
     *
91
     * @example
92
     * ```html
93
     * <igx-switch invalid></igx-switch>
94
     * ```
95
     * ```typescript
96
     * let isInvalid = this.switch.invalid;
97
     * ```
98
     */
99
    @HostBinding('class.igx-switch--invalid')
100
    @Input({ transform: booleanAttribute })
UNCOV
101
    public override invalid = false;
×
102

103
    /**
104
     * Sets/gets whether the switch component is on focus.
105
     * Default value is `false`.
106
     *
107
     * @example
108
     * ```typescript
109
     * this.switch.focused = true;
110
     * ```
111
     */
112
    @HostBinding('class.igx-switch--focused')
UNCOV
113
    public override focused = false;
×
114
}
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