Skip to content

Commit 1244e16

Browse files
MKirovaMKirova
authored andcommitted
chore(*): Add ssrId with null checks.
1 parent 29f95e1 commit 1244e16

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

projects/igniteui-angular-elements/src/app/wrapper/template-ref-wrapper.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ const PREFIX_IMPLICIT_PROP = '$implicit';
1111
export class TemplateRefWrapper<C extends object> extends TemplateRef<C> {
1212

1313
public override readonly elementRef: ElementRef<any>;
14+
15+
public get ssrId(): string | null {
16+
return (this as any)._declarationTContainer?.tView?.ssrId || null;
17+
}
18+
1419
/** Create a wrapper around TemplateRef with the context exposed */
1520
constructor(public innerTemplateRef: TemplateRef<C>, private _templateFunction: any, private embeddedViewDestroyCallback: (container: HTMLElement) => void) {
1621
super();

0 commit comments

Comments
 (0)