-
-
Notifications
You must be signed in to change notification settings - Fork 578
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
Directive approach does not work #439
Comments
Pretty weird, I think this problem could be related to the checkNodes function inside the directive, anyway, if you change your code to this one, it works:
Plunker: https://plnkr.co/edit/AKy99ttZz63Rht4tufby?p=preview |
I know about the option but actually the idea, why I want to use exactly directive approach is I still want to keep original text in template, i.e.:
|
Hi @stevermeister From DOM childNodes method documentation:: If you add a space in the This is in fact a bug. There should be a case where if childNodes length is empty, it should still render text. |
you probably did not get my point, I have more than space in between:
and it still does not work when I change the language |
Oh, if this code sample is from your actual code, then it's your syntax. you are missing single quote before the HELLO. |
I provided a plunker with exact code, you can check there. Quotes are on their place |
yes, #355 looks similar. it should do the check I think I need to dive in code myself, otherwise I'll never get an answer here :) |
I'm having the same issue with directive, they aren't updating. |
Had the same problem, but
did it for me. But i think this is not the total solution. Will there be a bugfix concerning this issue? |
ideally I would like to have response from @ocombe for this issue |
Seems like a bug to me: when the key is forced it doesn't detect changes because the key is always the same... |
I'm submitting a ...
[ x ] bug report
[ ] support request
[ ] feature request
Current behavior
Directive approach
<span [translate]="HELLO'"></span>
does not update the text when I switch to another language.
http://stackoverflow.com/questions/42349738/ngx-translate-pipe-vs-directive
plunker - https://plnkr.co/edit/PykLBrZGI1jz7Imsnzz6?p=preview
The text was updated successfully, but these errors were encountered: