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

IgniteUI / igniteui-angular / 13331632524

14 Feb 2025 02:51PM CUT coverage: 22.015% (-69.6%) from 91.622%
13331632524

Pull #15372

github

web-flow
Merge d52d57714 into bcb78ae0a
Pull Request #15372: chore(*): test ci passing

1990 of 15592 branches covered (12.76%)

431 of 964 new or added lines in 18 files covered. (44.71%)

19956 existing lines in 307 files now uncovered.

6452 of 29307 relevant lines covered (22.02%)

249.17 hits per line

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

7.69
/projects/igniteui-angular/src/lib/directives/form-control/form-control.directive.ts
1
import {
2
    Directive,
3
    forwardRef,
4
    ElementRef,
5
    HostListener,
6
    Renderer2
7
} from '@angular/core';
8
import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';
9

10
@Directive({ 
11
    selector: 'igc-rating[ngModel],igc-rating[formControlName]',
12
    providers: [
13
        {
14
            provide: NG_VALUE_ACCESSOR,
UNCOV
15
            useExisting: forwardRef(() => IgcFormControlDirective),
×
16
            multi: true
17
        }
18
    ],
19
    standalone: true
20
})
21
export class IgcFormControlDirective implements ControlValueAccessor {
2✔
22
    /** @hidden @internal */
UNCOV
23
    private onChange: any = () => { };
×
24
    /** @hidden @internal */
UNCOV
25
    private onTouched: any = () => { };
×
26

27
    constructor(
UNCOV
28
        private elementRef: ElementRef,
×
UNCOV
29
        private renderer: Renderer2) { }
×
30

31
    /** @hidden @internal */
32
    @HostListener('blur')
33
    public onBlur() {
UNCOV
34
        this.onTouched();
×
35
    }
36

37
    /** @hidden @internal */
38
    @HostListener('igcChange', ['$event.detail'])
39
    public listenForValueChange(value) {
UNCOV
40
        this.onChange(value);
×
41
    }
42

43
    /** @hidden @internal */
44
    public writeValue(value): void {
UNCOV
45
        if (value) {
×
UNCOV
46
            this.elementRef.nativeElement.value = value;
×
47
        }
48
    }
49

50
    /** @hidden @internal */
51
    public registerOnChange(fn): void {
UNCOV
52
        this.onChange = fn;
×
53
    }
54

55
    /** @hidden @internal */
56
    public registerOnTouched(fn): void {
UNCOV
57
        this.onTouched = fn;
×
58
    }
59

60
    /** @hidden @internal */
61
    public setDisabledState(isDisabled: boolean): void {
UNCOV
62
        this.renderer.setProperty(this.elementRef.nativeElement, 'disabled', isDisabled);
×
63
    }
64
}
65

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

© 2025 Coveralls, Inc