aurelia 有条件地显示和隐藏HTML元素

示例

使用时show.bind,元素保留在页面中,并且通过使用场景display:none或display:block在场景后隐藏或可见。

export class MyViewModel {
    isVisible = false;
}
<template>
    <div show.bind="isVisible"><strong>I can be both hidden or visible, but not at the same time</strong></div>
</template>