79681947

Date: 2025-06-27 12:35:24
Score: 0.5
Natty:
Report link

If you want to avoid multiple DataComponent being created in the this.ele ElementRef, you can check before adding a new instance.

addComp(){
  if (this.ele && !this.ele.firstChild) {
      this.ele.createComponent(DataComponent);
  }
}
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Weber K.