无法理解该代码的错误:
<div ng-show="advices.length > 3" ng-click="advicesLimit = (advicesLimit == 3)?advices.length:3" class="event more_history" style="padding: 0px;margin: 0px;background-color: white;">
<center class="ng-binding" style="font-size: 15px;padding-bottom: 4px;border-top: 2px;box-shadow: 0px 0px 0px 1px rgba(221, 221, 221, 0.92);">
<span ng-show="advicesLimit == 3">{{'More'|translate}} {{advices.length - 3}}</span>
<span ng-show="advicesLimit > 3">{{'Fill'|translate}}</span>
<i ng-show="advicesLimit == 3" class="down icon" style="padding-left: 10px;"></i>
<i ng-show="advicesLimit > 3" class="up icon" style="padding-left: 10px;"></i>
</center>
</div>
我有一个错误:
Error: [$parse:syntax] http://errors.angularjs.org/1.3.0-beta.2/$parse/syntax?p0=undefined&p1=expected%20%3A&p2=null&p3=3%3Fadvices&p4=3%3Fadvices
at Error (native)
at http://127.0.0.1/js/built/mainLib.js?b25:39:456
at Ya.throwError (http://127.0.0.1/js/built/mainLib.js?b25:193:322)
at Ya.ternary (http://127.0.0.1/js/built/mainLib.js?b25:197:221)
at Ya.assignment (http://127.0.0.1/js/built/mainLib.js?b25:196:366)
at Ya.expression (http://127.0.0.1/js/built/mainLib.js?b25:196:319)
at Ya.filterChain (http://127.0.0.1/js/built/mainLib.js?b25:195:449)
at Ya.statements (http://127.0.0.1/js/built/mainLib.js?b25:195:273)
at Ya.parse (http://127.0.0.1/js/built/mainLib.js?b25:192:147)
at $get (http://127.0.0.1/js/built/mainLib.js?b25:125:360) <div ng-show="advices.length >
所有变量都未定义。当我从控制器获得控制台的长度时,一切都很好,但是这个给了我一个错误。当我删除ng-click时没有检测到错误,所以问题可以是ng-click。
答案 0 :(得分:0)
发现问题。我打开了Angular扩展。当我关闭它时,一切都好了