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

atinc / ngx-tethys / cd64db52-e563-41a3-85f3-a0adb87ce135

30 Oct 2024 08:03AM UTC coverage: 90.402% (-0.04%) from 90.438%
cd64db52-e563-41a3-85f3-a0adb87ce135

push

circleci

web-flow
refactor: refactor constructor to the inject function (#3222)

5503 of 6730 branches covered (81.77%)

Branch coverage included in aggregate %.

422 of 429 new or added lines in 170 files covered. (98.37%)

344 existing lines in 81 files now uncovered.

13184 of 13941 relevant lines covered (94.57%)

997.19 hits per line

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

84.21
/src/radio/button/radio-button.component.ts
1
import { Component, OnInit, HostBinding, HostListener, Input, ChangeDetectorRef, inject } from '@angular/core';
2
import { ThyTranslate } from 'ngx-tethys/core';
3
import { ThyRadioGroup } from './../group/radio-group.component';
4
import { coerceBooleanProperty } from '@angular/cdk/coercion';
5
import { ThyRadio } from '../radio.component';
6

7
/**
8
 * @name [thy-radio-button],[thyRadioButton]
9
 */
1✔
10
@Component({
11
    // eslint-disable-next-line @angular-eslint/component-selector
7✔
12
    selector: '[thy-radio-button],[thyRadioButton]',
7✔
13
    templateUrl: './radio-button.component.html',
7✔
14
    standalone: true,
15
    host: {
16
        '[attr.tabindex]': `tabIndex`
56✔
17
    }
18
})
19
export class ThyRadioButton extends ThyRadio implements OnInit {
16✔
20
    @HostBinding('class.btn') isButton = true;
16✔
21
    @HostBinding('class.active') isActive = false;
22
    @HostBinding('class.disabled') get isDisabled() {
23
        return this._disabled;
7✔
24
    }
7!
25

7✔
26
    name: string;
7✔
27

28
    @Input() thyValue: string;
29

30
    set thyChecked(value: boolean) {
1!
UNCOV
31
        this.isActive = !!value;
×
32
        this.writeValue(coerceBooleanProperty(value));
33
    }
34

1✔
35
    ngOnInit() {
36
        this._isFormCheck = false;
37
        if (this.thyRadioGroupComponent) {
38
            this.thyRadioGroupComponent.addRadio(this);
39
            this.thyRadioGroupComponent.setGroup();
40
        }
41
    }
42

1✔
43
    @HostListener('click', ['$event'])
44
    click($event: MouseEvent) {
45
        if (!this._disabled) {
46
            this.change();
47
        }
48
    }
49
}
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