@vespinasgmailcom wrote:
I am trying to create a service method that renders a simple popover based on a list of possible string values, based on the popover sample provided in the documentation. In my method, I am creating a custom element this way:
customElements.define('ui-service-popover', class ModalContent extends HTMLElement { connectedCallback() { this.innerHTML = html; } });Where “html” is a string variable containing the list of options to be displayed. When I try to run this, I get an error indicating a provider for “ui-service-popover” does not exist.
Despite of that, I don’t think creating a custom element is the way to fo for me in this situation, since the element it self would change every time the method is called with a new set of options, so I wanted to explore other possibilities.
The Ionic documentation for app-popover-controller states that the component property on the create method accepts Function | HTMLElement | null | string values, but I haven’t be able to find any doc or example of how to pass other values than HTMLElement.
Any help here would be appreciated.
Posts: 1
Participants: 1