[英]Inverse of property in Ember Template
我有布爾屬性enableInput
,它表示是否要禁用輸入。 input
的disabled
屬性必須與enableInput
相反。 如何在不使用其他屬性的情況下執行此操作 ?
{{input type='text' value=model.someValue disabled=invert(model.enableInput)}}
使用inline-if
助手:
{{input type='text' value=model.someValue disabled=(if enableInput false true)}}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.