• 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

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

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

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

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

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

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

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

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

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

40
const Theme = {
3✔
41
    Material: "material",
42
    Fluent: "fluent",
43
    Bootstrap: "bootstrap",
44
    IndigoDesign: "indigo",
45
} as const;
46

47
/**
48
 * Determines the component theme.
49
 */
50
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