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

atinc / ngx-tethys / d9ae709b-3c27-4b69-b125-b8b80b54f90b

pending completion
d9ae709b-3c27-4b69-b125-b8b80b54f90b

Pull #2757

circleci

mengshuicmq
fix: fix code review
Pull Request #2757: feat(color-picker): color-picker support disabled (#INFR-8645)

98 of 6315 branches covered (1.55%)

Branch coverage included in aggregate %.

1 of 1 new or added line in 1 file covered. (100.0%)

2392 of 13661 relevant lines covered (17.51%)

83.12 hits per line

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

13.64
/src/breadcrumb/breadcrumb-item.component.ts
1
import { Component, ChangeDetectionStrategy, AfterViewInit, ElementRef, Renderer2 } from '@angular/core';
2
import { ThyIconComponent } 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]',
11
    template: '<ng-content></ng-content><thy-icon class="separator-icon" thyIconName="angle-right"></thy-icon>',
×
12
    exportAs: 'ThyBreadcrumbItem',
×
13
    changeDetection: ChangeDetectionStrategy.OnPush,
14
    host: {
15
        class: 'thy-breadcrumb-item'
×
16
    },
×
17
    standalone: true,
×
18
    imports: [ThyIconComponent]
×
19
})
20
export class ThyBreadcrumbItemComponent implements AfterViewInit {
21
    constructor(private renderer: Renderer2, private elementRef: ElementRef) {}
22

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

31
    private wrapSpanForText(nodes: NodeList): void {
32
        nodes.forEach(node => {
1✔
33
            if (node.nodeName === '#text') {
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);
1✔
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