Skip to content
This repository has been archived by the owner on Jan 29, 2024. It is now read-only.

translate-attr is not getting interpolated with translate-value-some-var directives #1652

Open
jakefreeberg opened this issue Nov 21, 2016 · 3 comments

Comments

@jakefreeberg
Copy link

jakefreeberg commented Nov 21, 2016

If you use the translate-value-something directive, your values don't get in to the translate-attr keys. Works fine with if you stick with translate-values, but we prefer the translate-value-syntax, if we can use it.

Environment

  • version of angular-translate: v2.13
  • version of angular: v1.4.8
  • which browser and its version: Chrome 53 Mac

Steps to reproduce

Here's a simple plnkr to prove it: https://plnkr.co/edit/H72uqf

Expected behaviour

translate-value-something="{{ thatThing }}" should work exactly like
translate-values="{'something': thatThing}"

Actual behaviour

The interpolated values from translate-value-var are not available to the translate-attr directive.

@jakefreeberg jakefreeberg changed the title translate-attr is not getting translate-value-some-var interpolated translate-attr is not getting interpolated with translate-value-some-var directives Nov 21, 2016
@jakefreeberg
Copy link
Author

I think I see how I might implement this but let me run it past you:
Within the translate-attr directive, you're watching the translateValues attr for updates.
If I did an Object.getOwnPropertyNames(attr) and started watching anything that started with translateValue I should be able to feed those values in.
Does that sound about right?
I've had no 👍 on this so I'm not sure its worth the effort, but I'd live to give a little back here so I may do it.

@knalli
Copy link
Member

knalli commented Jun 25, 2017

@jakefreeberg Yeah, the directive angular-attr is missing support for the translate-value-xyz attributes. Overseen..

@knalli
Copy link
Member

knalli commented Jun 25, 2017

Maybe the internal should be adapted like in the translate directive..

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

No branches or pull requests

2 participants