Angular ng-show慢慢隐藏

时间:2017-02-09 05:55:48

标签: angularjs ng-show

<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&#34; event&#34;。

1 个答案:

答案 0 :(得分:2)

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

import java.util.Random;

public class Answers
{
    public static void main(String[] args)
    {
        Random ranNum = new Random();
        String tweet = " \"So the combination is... one, two, three, four, five? That's the stupidest combination I've ever heard in my life! That's the kind of thing an idiot would have on his luggage!\"";
        final int TWEET_LENGTH = 140;

        while(tweet.length() > TWEET_LENGTH){
            int i = ranNum.nextInt(tweet.length());
            char c = tweet.charAt(i);
            if ((c !=' '))
            {
                tweet = tweet.substring(0,i) + tweet.substring(i+1);
            }
        }

        System.out.println(tweet);
        System.out.println(tweet.length());
    }
}