For a single style attribute, you can use the following syntax: <div [style.background-color]="style1 ? 'red' : (style2 ? 'blue' : null)">.
確定! 回上一頁