• 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

10.0
/src/core/overlay/portal-directives.ts
1
/* eslint-disable @angular-eslint/no-inputs-metadata-property */
2
/* eslint-disable @angular-eslint/directive-class-suffix */
3
import { CdkPortalOutlet, ComponentPortal } from '@angular/cdk/portal';
4
import { ComponentRef, Directive, EmbeddedViewRef } from '@angular/core';
5

6
@Directive({
1✔
7
    selector: '[thyPortalOutlet]',
8
    exportAs: 'thyPortalOutlet',
9
    inputs: ['portal: thyPortalOutlet']
10
})
11
export class ThyPortalOutlet extends CdkPortalOutlet {
12
    /**
13
     * Attach the given ComponentPortal to this PortalOutlet using the ComponentFactoryResolver.
UNCOV
14
     *
×
15
     * @param portal Portal to be attached to the portal outlet.
16
     * @returns Reference to the created component.
UNCOV
17
     */
×
UNCOV
18
    attachComponentPortal<T>(portal: ComponentPortal<T>): ComponentRef<T> {
×
19
        portal.setAttachedHost(this);
20

×
21
        // If the portal specifies an origin, use that as the logical location of the component
×
22
        // in the application tree. Otherwise use the location of this PortalOutlet.
23
        const viewContainerRef = portal.viewContainerRef != null ? portal.viewContainerRef : this['_viewContainerRef'];
24

25
        const ref = viewContainerRef.createComponent(portal.component, {
UNCOV
26
            index: viewContainerRef.length,
×
UNCOV
27
            injector: portal.injector || viewContainerRef.injector,
×
28
            projectableNodes: portal.projectableNodes || undefined
UNCOV
29
        });
×
UNCOV
30

×
UNCOV
31
        // If we're using a view container that's different from the injected one (e.g. when the portal
×
UNCOV
32
        // specifies its own) we need to move the component into the outlet, otherwise it'll be rendered
×
UNCOV
33
        // inside of the alternate view container.
×
34
        if (viewContainerRef !== this['_viewContainerRef']) {
35
            this['_getRootNode']().appendChild((ref.hostView as EmbeddedViewRef<any>).rootNodes[0]);
36
        }
1✔
37

38
        super.setDisposeFn(() => ref.destroy());
39
        this._attachedPortal = portal;
40
        this['_attachedRef'] = ref;
41
        this.attached.emit(ref);
42

43
        return ref;
44
    }
45
}
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