标签: angular
我想在条件为true时更改边框形式字段中输入的边框颜色。在其中放置文本后,颜色恢复正常。
答案 0 :(得分:1)
您应该在输入标签中使用style或ngClass
[ngClass]="{color-change: condition}"
或
[style.color]="condition? '#eee': '#234534' "