【发布时间】:2018-05-04 17:37:33
【问题描述】:
我所有的语法尝试都失败了,关于这个特殊案例的文档很难找到,也许你知道得更好。
.factsheet(ng-repeat="factsheet in factsheets)
a(ng-href="{{factsheet.link}}", onclick="aFunction('click', {{factsheet.title}})")
ng-href="{{factsheet.link}}", 就像一个魅力。 {{factsheet.title}} 是无法访问的变量。
我试过了
factsheet.title
还有那个
#{factsheet.title}
还有这个
"{{factsheet.title}}"
还有其他绝望的尝试……
'{{factsheet.title}}', "#{{factsheet.title}}"
没有任何效果,虽然我可以在内联 JS 之外轻松访问 title 属性
h2 {{factsheet.title[currentLang]}} // no worries
【问题讨论】: