Angular ng Translate non-breaking space  
Asked Answered
T

1

5

Hi is there any way to translate with non-breaking space (' ') I have tried with this

 es.json:
    " example": " ejemplo";
    
In my component I have this:
<ex-component
description = "{{ ('&nbsp;example' | translate) }} > 

but it is not working

Tying answered 22/3, 2021 at 12:28 Comment(1)
Try using the unicode escaped value in json and js: '\u00a0;example'Digress
D
7

As Tătar pointed out in his comment, using \u00a0 will works, but please note that there is no semi-colon (;) at the end.

Drusilladrusus answered 7/5, 2021 at 4:20 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.