0

I have the following in my tmpl file:

<div ng-include="include.tmpl" 
     ng-include-variables="{ text: {{ "global.login.text" | translate }} }"></div>

I get errors doing this. There must be a way I can pass the value of:

{{ "global.login.text" | translate }}

as "text" to my include.tmpl.

Does anyone know?

Paul Stanley
  • 4,018
  • 6
  • 35
  • 56
Justin
  • 623
  • 1
  • 10
  • 24
  • I believe you can wrap `{{ "global.login.text" | translate }}` in single quotes. My suspicion is the nested {{}} are evaluated as interpolation by angular. – Gregg May 24 '16 at 18:19
  • You can pass them as text and translate them inside `include.html` – Simon Schüpbach May 24 '16 at 18:35
  • @Gregg The single quote doesn't work – Justin May 24 '16 at 18:47
  • `ng-include-variables` isn't a thing AFAIK. (Some answers [here](http://stackoverflow.com/questions/25678560/angular-passing-scope-to-ng-include) use it as an attribute name for a custom directive, is that where you got it?) That question appears to contain the answer to this one, in any case – Daniel Beck May 24 '16 at 19:09

0 Answers0