• 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

28.57
/projects/igniteui-angular/src/lib/navbar/navbar.component.ts
1
import {
2
    Component,
3
    EventEmitter,
4
    HostBinding,
5
    Input,
6
    Output,
7
    Directive,
8
    ContentChild,
9
    booleanAttribute
10
} from '@angular/core';
11

12
import { IgxIconComponent } from '../icon/icon.component';
13

14
/**
15
 * IgxActionIcon is a container for the action nav icon of the IgxNavbar.
16
 */
17
@Directive({
18
    selector: 'igx-navbar-action,[igxNavbarAction]',
19
    standalone: true
20
})
21
export class IgxNavbarActionDirective { }
3✔
22

23
@Directive({
24
    selector: 'igx-navbar-title,[igxNavbarTitle]',
25
    standalone: true
26
})
27
export class IgxNavbarTitleDirective { }
3✔
28

29
let NEXT_ID = 0;
3✔
30
/**
31
 * **Ignite UI for Angular Navbar** -
32
 * [Documentation](https://www.infragistics.com/products/ignite-ui-angular/angular/components/navbar.html)
33
 *
34
 * The Ignite UI Navbar is most commonly used to provide an app header with a hamburger menu and navigation
35
 * state such as a "Go Back" button. It also supports other actions represented by icons.
36
 *
37
 * Example:
38
 * ```html
39
 * <igx-navbar title="Sample App" actionButtonIcon="menu">
40
 *   <igx-icon>search</igx-icon>
41
 *   <igx-icon>favorite</igx-icon>
42
 *   <igx-icon>more_vert</igx-icon>
43
 * </igx-navbar>
44
 * ```
45
 */
46

47
@Component({
48
    selector: 'igx-navbar',
49
    templateUrl: 'navbar.component.html',
50
    styles: [`
51
        :host {
52
            display: block;
53
            width: 100%;
54
        }
55
    `
56
    ],
57
    imports: [IgxIconComponent]
58
})
59

60
export class IgxNavbarComponent {
3✔
61
    /**
62
     * Sets the value of the `id` attribute. If not provided it will be automatically generated.
63
     * ```html
64
     * <igx-navbar [id]="'igx-navbar-12'" title="Sample App" actionButtonIcon="menu">
65
     * ```
66
     */
67
    @HostBinding('attr.id')
68
    @Input()
UNCOV
69
    public id = `igx-navbar-${NEXT_ID++}`;
×
70

71
    /**
72
     * Sets the icon of the `IgxNavbarComponent`.
73
     * ```html
74
     * <igx-navbar [title]="currentView" actionButtonIcon="arrow_back"></igx-navbar>
75
     * ```
76
     */
77
    @Input() public actionButtonIcon: string;
78

79
    /**
80
     * Sets the title of the `IgxNavbarComponent`.
81
     * ```html
82
     * <igx-navbar title="Sample App" actionButtonIcon="menu">
83
     * ```
84
     */
85
    @Input() public title: string;
86

87
    /**
88
     * The event that will be thrown when the action is executed,
89
     * provides reference to the `IgxNavbar` component as argument
90
     * ```typescript
91
     * public actionExc(event){
92
     *     alert("Action Execute!");
93
     * }
94
     *  //..
95
     * ```
96
     * ```html
97
     * <igx-navbar (action)="actionExc($event)" title="Sample App" actionButtonIcon="menu">
98
     * ```
99
     */
UNCOV
100
    @Output() public action = new EventEmitter<IgxNavbarComponent>();
×
101

102
    /**
103
     * Sets the titleId of the `IgxNavbarComponent`. If not set it will be automatically generated.
104
     * ```html
105
     * <igx-navbar [titleId]="'igx-navbar-7'" title="Sample App" actionButtonIcon="menu">
106
     * ```
107
     */
108
    @Input()
UNCOV
109
    public titleId = `igx-navbar-title-${NEXT_ID++}`;
×
110

111
    /**
112
     * @hidden
113
     */
114
    @ContentChild(IgxNavbarActionDirective, { read: IgxNavbarActionDirective })
115
    protected actionIconTemplate: IgxNavbarActionDirective;
116

117
    /**
118
     * @hidden
119
     */
120
    @ContentChild(IgxNavbarTitleDirective, { read: IgxNavbarTitleDirective })
121
    protected titleContent: IgxNavbarTitleDirective;
122

UNCOV
123
    private isVisible = true;
×
124

125
    /**
126
     * Sets whether the action button of the `IgxNavbarComponent` is visible.
127
     * ```html
128
     * <igx-navbar [title]="currentView" [isActionButtonVisible]="'false'"></igx-navbar>
129
     * ```
130
     */
131
    public set isActionButtonVisible(value: boolean) {
UNCOV
132
        this.isVisible = value;
×
133
    }
134

135
    /**
136
     * Returns whether the `IgxNavbarComponent` action button is visible, true/false.
137
     * ```typescript
138
     *  @ViewChild("MyChild")
139
     * public navBar: IgxNavbarComponent;
140
     * ngAfterViewInit(){
141
     *     let actionButtonVisibile = this.navBar.isActionButtonVisible;
142
     * }
143
     * ```
144
     */
145
    @Input({ transform: booleanAttribute })
146
    public get isActionButtonVisible(): boolean {
UNCOV
147
        if (this.actionIconTemplate || !this.actionButtonIcon) {
×
UNCOV
148
            return false;
×
149
        }
UNCOV
150
        return this.isVisible;
×
151
    }
152

153
    public get isTitleContentVisible(): boolean {
UNCOV
154
        return this.titleContent ? true : false;
×
155
    }
156

157
    /**
158
     * @hidden
159
     */
160
    public _triggerAction() {
UNCOV
161
        this.action.emit(this);
×
162
    }
163
}
164

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