Description
I'm submitting a ...
[x ] bug report => check the FAQ and search github for a similar issue or PR before submitting
[ ] support request => check the FAQ and search github for a similar issue before submitting
[ ] feature request
Current behavior
When passing a variable inside the translateParams on the translate directive, the text gets rendered once, it will not change even if you change the variable.
It seems to be that this only happens with objects, arrays, etc. and not with strings or numbers.
Expected/desired behavior
Whenever the translateParams variable change the text should be rendered again
Reproduction of the problem
http://plnkr.co/edit/4nHPcxwspCsQJyRQ69vP?p=preview
What is the expected behavior?
Whenever the translateParams variable change the text should be rendered again
What is the motivation / use case for changing the behavior?
Suppose you have a list of users, and an inline modal, whenever you click a user you want to show a modal with a text containing the name of the user in the middle, so you have a variable globalUser, everytime you click a user the globalUser variable changes so you expect the modal text to have the name of the current user, this doesn't happen with the actual behaviour, it keeps showing the text that the variable has at the moment it renders.
Please tell us about your environment:
OSX: Sierra
Darwin l 16.3.0 Darwin Kernel Version 16.3.0: Thu Nov 17 20:23:58 PST 2016; root:xnu-3789.31.2~1/RELEASE_X86_64 x86_64
-
ngx-translate version: 6.0.0
-
Angular version: 2.4.7
-
Browser: all