angularjs - 我可以在 Angular 指令的属性值中使用双引号吗?

标签 angularjs angularjs-directive quotes double-quotes

你能建议如何分配{{$count}} times per month <span ng-include="'views/partials/month-dates.html'"></span>吗?至 translate-plural属性?

例如以下表达式导致解析错误:

<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>

最佳答案

您是否尝试过使用 ""?我只是在属性内的 Angular 表达式中遇到了类似的问题,它是这样工作的。

关于angularjs - 我可以在 Angular 指令的属性值中使用双引号吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33558883/

相关文章:

javascript - 在 Angularjs 中添加具有不同值的新 HTML 内容

javascript - ng-include 不起作用

javascript - 如何更改 IIS 默认网站的 angularJS 指令

删除 colname 中的引号?

javascript - 是否有任何解决方法可以使 Chrome 正确排序?

AngularJS 与 node-webkit

javascript - 编写自己的代码后,Angularjs 无法在 Windows chrome 和 firefox 中工作

javascript - Typescript 删除代码中未使用的导入语句

c# - 将 XmlDocument 转换为字符串

mysql - MySQL 中何时使用单引号、双引号和反引号