2017-02-09 8 views
1
<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> 

角度NG-ショーゆっくり隠さ

こんにちは、

私は他の上に1を座っている2つのボタンがあると私は、フラグ(isSearchIconVisible)で視覚的にそれらの間を切り替えたいです。 Logiclyはうまく動作しますが、一緒に見て重複していることが500msあります。 私はdirectiveを使ってng-showが完了した "イベント"をキャッチしました。

+0

2番目のボタンには「my-show」とは何ですか? –

+0

コードをフィドルで提供できますか? – Indhu

答えて

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; 
} 
+0

素晴らしい!それは私のために働く、ありがとう。 – EitanG