【发布时间】:2019-03-04 19:36:15
【问题描述】:
我有以下模板:
<!--Votez pour ce concept de bar:-->
<p ng-show="enabled('http://ballentines.herokuapp.com/{{finalist.slug}}.html') === 'novote'">Not voted</p>
<!-- Vous avez voté pour ce concept de bar-->
<p ng-show="enabled('http://ballentines.herokuapp.com/{{finalist.slug}}.html') === 'thisvote'">
Voted for this concept
</p>
<!--Vous ne pouvez voter que pour un seul concept de bar -->
<p ng-show="enabled('http://ballentines.herokuapp.com/{{finalist.slug}}.html') === 'othervote'">
Voted for another concept
</p>
当我尝试运行它时,我得到了
Error: [$parse:lexerr] Lexer Error: Unterminated quote at columns 8-57 ['http://ballentines.herokuapp.com/{{finalist.slug] in expression [enabled('http://ballentines.herokuapp.com/{{finalist.slug].
http://errors.angularjs.org/1.2.11/$parse/lexerr?p0=Unterminated%20quote&p1=s%208-57%20%5B'http%3A%2F%2Fballentines.herokuapp.com%2F%7B%7Bfinalist.slug%5D&p2=enabled('http%3A%2F%2Fballentines.herokuapp.com%2F%7B%7Bfinalist.slug
我做错了什么?
【问题讨论】:
-
这里有同样的错误。期待答案。
-
fwiw(尽管您看到的可能不是同一个问题)当我在角度属性规范中有一个额外的“=”字符时,我遇到了类似的 Lexer 错误。当我删除额外的“=”时,错误就消失了。我无法使用此plunker 重现此错误。您是否知道任何其他可能也会影响此的代码?指令、包含等? finalist.slug 的价值是什么?
标签: angularjs