ngneat / helipopper

🚁 A Powerful Tooltip and Popover for Angular Applications
https://ngneat.github.io/helipopper/
MIT License
405 stars 41 forks source link

ERROR Type of content is not supported #151

Open blakazulu opened 9 months ago

blakazulu commented 9 months ago

Hi, I'm trying to create a popup programmatically using this logic:

   const element: HTMLElement = filterElement;
  // Clear the container if needed
  this.viewContainerRef.clear();

  // Assume filters is an array of your Filter type and filter is a single Filter instance
  const componentRef = filters
    ? this.viewContainerRef.createComponent(MetadataFilterDropdownComponent)
    : this.viewContainerRef.createComponent(FilterDropdownComponent);

  // Assuming tippyService.create accepts an HTMLElement and options
  const domElem = componentRef.location.nativeElement;

  this.tippy = this.tippyService.create(element, domElem);

The component is showing up. but... the problem I'm getting is this - "ERROR Type of content is not supported"

I would love some help trying to understand this.