Is it possible to data-bind visible to the negation (“!”) of a boolean ViewModel property?

前端 未结 8 1014
清歌不尽
清歌不尽 2020-12-23 15:24

I\'d like to use a property on my ViewModel to toggle which icon to display without creating a separate computed property of the inverse. Is this possible?



        
8条回答
  •  轮回少年
    2020-12-23 16:16

    When using an observable in an expression you need to access it as a function like:

    visible: !charted()

提交回复
热议问题