-
Notifications
You must be signed in to change notification settings - Fork 159
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
dx-button not working properly with @ngneat/transloco pipe #1163
Comments
Maybe you should try binding text property? <dx-button
[text]="'Some.Translation' | transloco"
></dx-button> |
Don't get me wrong, but I tried it and I even mentioned that in my issue description. When i set the text attribute it doesn't center the text, when i change the height to be smaller
Nonetheless it works in my wrapped component, also described in the issue.
You can check out the stackblitz repo I setup, I've described everything i noticed there. |
Maybe is the TranslocoModule: is not imported anywhere. |
The problem is that it doesn't render correctly, not that it isn't showing anything. If you look at the Stackblitz, you can see it. |
I found an issue where working with @ngneat/transloco is not showing the translation when setting it to the body of the dx-button. It will work with the transloco directive and if I set the text attribute.
But in my custom dialog component (wrapped dx-popup) i specified some buttons and set the text in the body with the transloco pipe and this somehow works.
Small side note, setting the text attribute and changing the height doesn't center the text. This might not correlate with the transloco problem, but it is still weird.
I made a Stackblitz project, where you can see the problem in action.
https://stackblitz.com/edit/angular-ivy-5yzupo
If you made some changes to the code on Stackblitz, you probably have to reload the whole site, cause the dx-popup won't open after changes.
Steps to Reproduce:
<dx-button (onClick)="showDialog()" type="danger"> {{ 'Some.Translation' | transloco }} </dx-button>
Results You Received:
No text displayed when using the transloco pipe inside a button
Results You Expected:
Text to be displayed when using the transloco pipe inside a button
Environment Details:
angular 11
devextreme 20.2.6
devextreme-angular 20.2.6
@ngneat/transloco 2.20.1
The text was updated successfully, but these errors were encountered: