Select to view content in your preferred language

Issue with calcite-components-angular

432
1
12-01-2023 06:23 AM
ForrestLin
Frequent Contributor

calcite-components-angular is released with calcite-components 1.11.0!

I got an issue with ElementRef:  nativeElement of ElementRef is undefined.

 

// alert.component.html

<calcite-alert #alertNode kind="danger" icon label="An report alert" scale="m">
  <div slot="title">{{alertService.alert.title}}</div>
  <div slot="message">{{alertService.alert.message}}</div>
</calcite-alert>
 
// alert.component.ts
 

@ViewChild('alertNode', { static: true })

private alertRef!: ElementRef;
 
this.alertRef.nativeElement is undefined.
0 Kudos
1 Reply
ForrestLin
Frequent Contributor

Failed to compile with calcite-components-angular 2.0.0

ForrestLin_0-1701875022506.png

No problem to compile with calcite-components-angular 1.11.0.

0 Kudos