【问题标题】:Angular ng-show slowly hiddenAngular ng-show 慢慢隐藏
【发布时间】:2017-02-09 05:55:47
【问题描述】:
<div>
    <button type="submit" class="btnSubmit" ng-show="vm.isSearchIconVisible" after-hide="afterHide()" after-show="afterShow()">
       <i class="iconMglass"></i>
    </button>
    <button type="reset" my-show="!vm.isSearchIconVisible" after-hide="afterHide()" after-show="afterShow()" class="clearTextButton" ng-click="vm.clearSearchText()" >
       <span class="clearIcon">X</span>
   </button>

嗨,

我有两个按钮,一个在另一个之上,我想用一个标志 (isSearchIconVisible) 直观地在它们之间切换。 从逻辑上讲,它工作正常,但有 500 毫秒的时间它们被一起看到并重叠。 我已经使用directive 来捕捉 ng-show 完成的“事件”。

【问题讨论】:

  • 第二个按钮中的“my-show”是什么?
  • 你能提供带有小提琴的代码吗?

标签: angularjs ng-show


【解决方案1】:

尝试在样式表中添加这些样式。

.ng-hide.ng-hide-animate {
     display: none !important;
 }

.ng-animate.no-animate {
     transition: 0s none;
     -webkit-transition: 0s none;
     animation: 0s none;
     -webkit-animation: 0s none;
 }

【讨论】:

    猜你喜欢
    • 2016-01-11
    • 1970-01-01
    • 1970-01-01
    • 2011-03-01
    • 1970-01-01
    • 2020-08-08
    • 1970-01-01
    • 2015-01-12
    • 1970-01-01
    相关资源
    最近更新 更多