我正在尝试使用 ng-pluralize 根据 yml 翻译有条件地显示 HTML。不幸的是,HTML 被 ng-pluralize 忽略并显示为带有插值计数的字符串文字。可以做我想做的事吗?
HAML
%span(ng-if="user.streak_count" ng-pluralize
count="user.streak_count" when="{'1': #{t('.one_streak_html')},
'other': #{t('.streak_html')} }")
YML
streak_html: "'<b>{}</b> days in a row'"
one_streak_html: "'<b>{}</b> day in a row'"
显示
<b>2</b> days in a row
最佳答案
关于javascript - ng-pluralize 与 yml html 翻译,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30401736/