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

atinc / ngx-tethys / 68ef226c-f83e-44c1-b8ed-e420a83c5d84

28 May 2025 10:31AM UTC coverage: 10.352% (-80.0%) from 90.316%
68ef226c-f83e-44c1-b8ed-e420a83c5d84

Pull #3460

circleci

pubuzhixing8
chore: xxx
Pull Request #3460: refactor(icon): migrate signal input #TINFR-1476

132 of 6823 branches covered (1.93%)

Branch coverage included in aggregate %.

10 of 14 new or added lines in 1 file covered. (71.43%)

11648 existing lines in 344 files now uncovered.

2078 of 14525 relevant lines covered (14.31%)

6.69 hits per line

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

9.52
/src/breadcrumb/breadcrumb-item.component.ts
1
import { Component, ChangeDetectionStrategy, AfterViewInit, ElementRef, Renderer2, inject } from '@angular/core';
2
import { ThyIcon } from 'ngx-tethys/icon';
3

4
/**
5
 * 面包屑 Item 组件
6
 * @name thy-breadcrumb-item,[thyBreadcrumbItem]
7
 * @order 20
8
 */
9
@Component({
1✔
10
    selector: 'thy-breadcrumb-item,[thyBreadcrumbItem]',
UNCOV
11
    template: '<ng-content></ng-content><thy-icon class="separator-icon" thyIconName="angle-right"></thy-icon>',
×
UNCOV
12
    exportAs: 'ThyBreadcrumbItem',
×
13
    changeDetection: ChangeDetectionStrategy.OnPush,
14
    host: {
UNCOV
15
        class: 'thy-breadcrumb-item'
×
UNCOV
16
    },
×
UNCOV
17
    imports: [ThyIcon]
×
UNCOV
18
})
×
19
export class ThyBreadcrumbItem implements AfterViewInit {
20
    private renderer = inject(Renderer2);
21
    private elementRef = inject(ElementRef);
UNCOV
22

×
UNCOV
23
    ngAfterViewInit() {
×
UNCOV
24
        this.wrapSpanForText(this.elementRef.nativeElement.childNodes);
×
UNCOV
25
        const link: HTMLElement = this.elementRef.nativeElement.querySelector('a');
×
UNCOV
26
        if (link && link.childNodes) {
×
UNCOV
27
            this.wrapSpanForText(link.childNodes);
×
UNCOV
28
        }
×
29
    }
30

31
    private wrapSpanForText(nodes: NodeList): void {
32
        nodes.forEach(node => {
33
            if (node.nodeName === '#text') {
1✔
34
                const span = this.renderer.createElement('span');
35
                const parent = this.renderer.parentNode(node);
36
                this.renderer.addClass(span, 'thy-wrap-span');
37
                this.renderer.insertBefore(parent, span, node);
38
                this.renderer.appendChild(span, node);
39
            }
40
        });
41
    }
42
}
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