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

IgniteUI / igniteui-angular / 16193550997

10 Jul 2025 11:12AM UTC coverage: 4.657% (-87.0%) from 91.64%
16193550997

Pull #16028

github

web-flow
Merge f7a9963b8 into 87246e3ce
Pull Request #16028: fix(radio-group): dynamically added radio buttons do not initialize

178 of 15764 branches covered (1.13%)

18 of 19 new or added lines in 2 files covered. (94.74%)

25721 existing lines in 324 files now uncovered.

1377 of 29570 relevant lines covered (4.66%)

0.53 hits per line

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

91.67
/projects/igniteui-angular/src/lib/services/theme/theme.token.ts
1
import { inject, InjectionToken } from "@angular/core";
2
import { mkenum } from "../../core/utils";
3
import { BehaviorSubject } from "rxjs";
4
import { DOCUMENT } from "@angular/common";
5

6
export class ThemeToken {
7
    private document = inject(DOCUMENT);
13✔
8
    public subject: BehaviorSubject<IgxTheme>;
9

10
    constructor(private t?: IgxTheme) {
13✔
11
        const globalTheme = globalThis.window
13!
12
            ?.getComputedStyle(this.document.body)
13
            .getPropertyValue("--ig-theme")
14
            .trim() || 'material' as IgxTheme;
15

16
        const _theme = t ?? globalTheme as IgxTheme;
13✔
17
        this.subject = new BehaviorSubject(_theme);
13✔
18
    }
19

20
    public onChange(callback: (theme: IgxTheme) => void) {
21
        return this.subject.subscribe(callback);
43✔
22
    }
23

24
    public set(theme: IgxTheme) {
UNCOV
25
        this.subject.next(theme);
×
26
    }
27

28
    public get theme() {
29
        return this.subject.getValue();
43✔
30
    }
31

32
    public get preferToken() {
33
        return !!this.t;
43✔
34
    }
35
}
36

37
export const THEME_TOKEN = new InjectionToken<ThemeToken>('ThemeToken', {
3✔
38
    providedIn: 'root',
39
    factory: () => new ThemeToken()
13✔
40
});
41

42
const Theme = /*@__PURE__*/ mkenum({
3✔
43
    Material: "material",
44
    Fluent: "fluent",
45
    Bootstrap: "bootstrap",
46
    IndigoDesign: "indigo",
47
});
48

49
/**
50
 * Determines the component theme.
51
 */
52
export type IgxTheme = (typeof Theme)[keyof typeof Theme];
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