Community Forum
Variable naming broken with Angular
about 2 months ago by Alexander Russell
As angular injects an attribute at the start of the var, that name is pulled into the translation phrase instead of the intended name.
In code:
<var count="" data-var="count">{{ this.count }}</var> Rows
Rendered:
<var _ngcontent-ng-c1052964112="" count="" data-var="count">280</var> Rows
When checking LocalizeJS it is detected as
{{_ngcontent-ng-c1052964112}} Rows
A fix would be to grab the name from data-var
first, then the first attribute if it was empty.