Skip to content

dx-button not working properly with @ngneat/transloco pipe #1163

Open
@arndwestermann

Description

@arndwestermann

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:

  1. Add @ngneat/transloco to your project
  2. declare a button the following way:
    <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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions