Skip to content
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

'translate' directive not working as expected #380

Closed
jeanpaulattard opened this issue Jan 2, 2017 · 2 comments
Closed

'translate' directive not working as expected #380

jeanpaulattard opened this issue Jan 2, 2017 · 2 comments

Comments

@jeanpaulattard
Copy link

jeanpaulattard commented Jan 2, 2017

I'm submitting a ... (check one with "x")

[x ] bug report => check the FAQ and search github for a similar issue or PR before submitting

Current behavior

I'm currently using the 'translate' directive in the following manner (following the examples provided in the readme)

<strong [translate]="'HELLO'"></strong> (note the single quotes)

however the innerHTML of the <strong> element is not filled. The resultant html is as follows :

<strong ng-reflect-translate="REGISTRATION.HEADER"></strong>

On the other hand, when i use the translate directive like in the following manner

<strong translate>HELLO</strong>

the innerHTML of the <strong> element is being filled with the correct translations.

Expected/desired behavior

The first method should work like the second method, as described in the readme.

Please tell us about your environment:

  • ng2-translate version: 5.0.0

  • Angular version: 2.2.4

  • Browser: [Chrome latest]

  • Language: [ TypeScript 2.0.10 ]

@kirillgroshkov
Copy link

I have the same issue. It works when you do this:

<strong [translate]="'HELLO'">any non empty content here</strong>

But doesn't work when the content of the node is empty.

@ocombe ocombe added this to the 6.0.0 milestone Feb 7, 2017
@ocombe
Copy link
Member

ocombe commented Feb 14, 2017

Duplicate of #355, closing this one

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants