【发布时间】:2018-01-08 04:42:01
【问题描述】:
我有这样的情况
<table ng-if="name=='john' && name=='MARK'">
//rest of the code
</table>
我的代码将在 ng-if 为真时执行。
现在我的疑问是,即使名称是大写和小写,ng-if 也应该为真..
<table ng-if="name=='JOhN' && name=='maRK'">
//rest of the code
</table>
有可能吗?
我也尝试过使用if-else 条件。
if(name.toString()='john'){
alert('success')
}
else{
alert('failure')
}
对吗?
【问题讨论】:
标签: javascript jquery angularjs