• 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

5.56
/projects/igniteui-angular/src/lib/carousel/slide.component.ts
1
import { Component, OnDestroy, Input, HostBinding, Output, EventEmitter, ElementRef, AfterContentChecked, booleanAttribute, Inject } from '@angular/core';
2
import { Subject } from 'rxjs';
3
import { Direction, IgxSlideComponentBase } from './carousel-base';
4

5
/**
6
 * A slide component that usually holds an image and/or a caption text.
7
 * IgxSlideComponent is usually a child component of an IgxCarouselComponent.
8
 *
9
 * ```
10
 * <igx-slide [input bindings] >
11
 *    <ng-content></ng-content>
12
 * </igx-slide>
13
 * ```
14
 *
15
 * @export
16
 */
17
@Component({
18
    selector: 'igx-slide',
19
    templateUrl: 'slide.component.html',
20
    standalone: true
21
})
22
export class IgxSlideComponent implements AfterContentChecked, OnDestroy, IgxSlideComponentBase {
3✔
23
    /**
24
     * Gets/sets the `index` of the slide inside the carousel.
25
     * ```html
26
     * <igx-carousel>
27
     *  <igx-slide index="1"></igx-slide>
28
     * <igx-carousel>
29
     * ```
30
     *
31
     * @memberOf IgxSlideComponent
32
     */
33
    @Input() public index: number;
34

35
    /**
36
     * Gets/sets the target `direction` for the slide.
37
     * ```html
38
     * <igx-carousel>
39
     *  <igx-slide direction="NEXT"></igx-slide>
40
     * <igx-carousel>
41
     * ```
42
     *
43
     * @memberOf IgxSlideComponent
44
     */
45
    @Input() public direction: Direction;
46

47
    @Input()
48
    public total: number;
49

50
    /**
51
     * Returns the `tabIndex` of the slide component.
52
     * ```typescript
53
     * let tabIndex =  this.carousel.tabIndex;
54
     * ```
55
     *
56
     * @memberof IgxSlideComponent
57
     * @deprecated in version 19.2.0.
58
     */
59
    @HostBinding('attr.tabindex')
60
    public get tabIndex() {
UNCOV
61
        return this.active ? 0 : null;
×
62
    }
63

64
    /**
65
     * @hidden
66
     */
67
    @HostBinding('attr.id')
68
    public id: string;
69

70
    /**
71
     * Returns the `role` of the slide component.
72
     * By default is set to `tabpanel`
73
     *
74
     * @memberof IgxSlideComponent
75
     */
76
    @HostBinding('attr.role')
UNCOV
77
    public tab = 'tabpanel';
×
78

79
    /** @hidden */
80
    @HostBinding('attr.aria-labelledby')
81
    public ariaLabelledBy;
82

83
    /**
84
     * Returns the class of the slide component.
85
     * ```typescript
86
     * let class =  this.slide.cssClass;
87
     * ```
88
     *
89
     * @memberof IgxSlideComponent
90
     */
91
    @HostBinding('class.igx-slide')
UNCOV
92
    public cssClass = 'igx-slide';
×
93

94
    /**
95
     * Gets/sets the `active` state of the slide.
96
     * ```html
97
     * <igx-carousel>
98
     *  <igx-slide [active] ="false"></igx-slide>
99
     * <igx-carousel>
100
     * ```
101
     *
102
     * Two-way data binding.
103
     * ```html
104
     * <igx-carousel>
105
     *  <igx-slide [(active)] ="model.isActive"></igx-slide>
106
     * <igx-carousel>
107
     * ```
108
     *
109
     * @memberof IgxSlideComponent
110
     */
111
    @HostBinding('class.igx-slide--current')
112
    @Input({ transform: booleanAttribute })
113
    public get active(): boolean {
UNCOV
114
        return this._active;
×
115
    }
116

117
    public set active(value) {
UNCOV
118
        this._active = value;
×
UNCOV
119
        this.activeChange.emit(this._active);
×
120
    }
121

122
    @HostBinding('class.igx-slide--previous')
UNCOV
123
    @Input({ transform: booleanAttribute }) public previous = false;
×
124

125
    /**
126
     * @hidden
127
     */
UNCOV
128
    @Output() public activeChange = new EventEmitter<boolean>();
×
129

UNCOV
130
    private _active = false;
×
UNCOV
131
    private _destroy$ = new Subject<boolean>();
×
132

UNCOV
133
    constructor(private elementRef: ElementRef) { }
×
134

135
    /**
136
     * Returns a reference to the carousel element in the DOM.
137
     * ```typescript
138
     * let nativeElement =  this.slide.nativeElement;
139
     * ```
140
     *
141
     * @memberof IgxSlideComponent
142
     */
143
    public get nativeElement() {
UNCOV
144
        return this.elementRef.nativeElement;
×
145
    }
146

147
    /**
148
     * @hidden
149
     */
150
    public get isDestroyed(): Subject<boolean> {
UNCOV
151
        return this._destroy$;
×
152
    }
153

154
    public ngAfterContentChecked() {
UNCOV
155
        this.id = `panel-${this.index}`;
×
UNCOV
156
        this.ariaLabelledBy = `tab-${this.index}-${this.total}`;
×
157
    }
158

159
    /**
160
     * @hidden
161
     */
162
    public ngOnDestroy() {
UNCOV
163
        this._destroy$.next(true);
×
UNCOV
164
        this._destroy$.complete();
×
165
    }
166
}
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