在 angular 中使用 ng-show 突然改变

Change abrupt with ng-show in angular

我的模板中有这样的东西:

<span data-ng-show="!products.specialCurrency">
    <span class="table-course-price">Something here 1</span>
</span>
<span data-ng-show="products.specialCurrency">
    <span class="table-course-price">Something here 2</span>
</span>

因此,这些跨度取决于 specialCurrency 变量。当它们之间的跨度发生变化时,变化有点突然,我想要更柔和的变化,但没有使用动画之类的。

有什么想法吗? 谢谢!

尝试使用 data-ng-if 而不是 data-ng-show。看看是否适合您。