您能否建议如何将{{$count}} times per month <span ng-include="'views/partials/month-dates.html'"></span>
分配给translate-plural
属性?
E.g。以下表达式导致解析错误:
<translate translate-n="notification.Data[flightType][direction].Days.length" translate-plural="{{$count}} times per month <span ng-include=\"'views/partials/month-dates.html'\"></span>">
N times per month on <span ng-include="'views/partials/month-dates.html'"></span>
</translate>
答案 0 :(得分:1)
您是否尝试使用"
或"
?我只是在属性中有一个角度表达式的类似问题,它就像这样工作。
答案 1 :(得分:0)
因为我没有收到任何好的答案,所以我将分享我在这个主题上发现的内容。
如果确实需要在指令属性中使用双引号 有两种方式:
见下面的解决方案
<div ng-init="monthDatesView = 'views/partials/month-dates.html'"></div>
<translate translate-n="notification.Data[flightType][direction].Days.length" translate-plural="{{$count}} times per month on <span ng-include='monthDatesView'></span>">
N times per month on <span ng-include="monthDatesView"></span>
</translate>