扫码关注官方订阅号
ng-class="{1:'del',0:'nodel'}[x.type]"想再根据状态显示不同class
认证高级PHP讲师
用三元运算符:ng-class={param?"a":"b"}
ng-class="{'enable' : x.status && x.type, 'disable' : !x.status && x.type, 'unlock' : !x.type}"
微信扫码关注PHP中文网服务号
QQ扫码加入技术交流群
Copyright 2014-2026 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
PHP学习
技术支持
返回顶部
用三元运算符:ng-class={param?"a":"b"}