i18next / ng-i18next

translation for AngularJS using i18next
https://github.com/i18next/ng-i18next
MIT License
161 stars 54 forks source link

Example of passing interpolated values to directive #127

Closed httpete closed 7 years ago

httpete commented 7 years ago

Hi,

I am struggling to see an example of a very common use

//string is "About {productName}

<h3 ng-i18next="ns:aboutProduct({ productName: 'pete' }}"></h3>

how do I pass the object containing key value pairs for interpolation? Thank you.

anwalkers commented 7 years ago

Have you tried...

<h3 ng-i18next="[i18next]({ productName: 'pete' })ns:aboutProduct"></h3>