繁体   English   中英

在ng-show上使用大于运算符

[英]Use greater than operator on ng-show

我想在div上使用ng-show 我尝试了以下代码,但似乎无法正常工作。

<div style="color:red; font-size:small" ng-show="a > {{b}}">Hello</div>

ng-show的表达式已经使用了当前作用域的上下文。 无需进行模板插值(即{{b}} )。

做就是了:

<div style="color:red; font-size:small" ng-show="a > b">Hello</div>

这应该可以解决问题。

这很容易

<div style="color:red; font-size:small" ng-show="a > b">Hello</div>

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM