-
-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AllowHTML flag doesn't work in custom variations #101
Comments
Same issue here #96 |
You can use ng-template |
I don't mind seeing a PR that makes it configurable. |
@NetanelBasal ng-template is not an option in some cases. |
I concern that upgrading the package version breaks the existing functionality. |
@NetanelBasal did you get a change to check this example? Do you have any suggestions what to do in such cases? |
<h1>Allow HTML test</h1>
<ul *ngFor="let item of items">
<ng-template #foo>
<p>{{ item.name }}</p>
</ng-template>
<li [tippy]="foo" variation="templateTooltip">
{{ item.name }}
</li>
</ul> |
@NetanelBasal unfortunately the solution you provided is not working. Please check |
if you want to render html inside ng-template use innerHTML |
I'm submitting a...
Current behavior
I have bunch of tooltips with custom HTML templates in my project and they worked perfect on 3.1.0 version of @ngneat/helipopper.
After upgrading the version to 5.1.4 it doesn't work. It is now showing tags (like it is just a string) rather than parsed HTML.
I've tried to show a tooltip with a template using custom variation and allowHTML flag, but it doesn't seem to work too.
I've created a new variation that extends the existing one:
Then in app.module.ts
Tooltip is defined in component like:
Tooltip = '<p>some title</p><p>my custom content</p>';
In template:
<span [tippy]="Tooltip" variation="templateTooltip"></span>
After all that manipulations I still see my tooltip rendering with tags and not parsing the custom template.
Can you please guide me what am I doing wrong? Or is it the issue with "allowHTML" flag?
Environment
The text was updated successfully, but these errors were encountered: