亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

angular.js - angularjs labels keep flashing when hovering with the mouse
巴扎黑
巴扎黑 2017-05-15 17:07:12
0
3
791

When I was writing a mouse hover event using angularjs, I found that the label kept flashing when the mouse was pressed. The angular code is as follows:

<p ng-init="show=true" class="carousel-caption alert alert-success login-status">
     <label ng-show="show" ng-mouseenter="show=false" ng-mouseleave="show=true">
           登錄成功
     </label>
     <p ng-show="!show">
          進入主頁
     </p>
 </p>
 

Is there anything wrong with this code?

The effect to be achieved is that when the mouse hovers over the label of successful login, the enter home page label will appear. Please give me some pointers if you see the problem, thank you very much!

巴扎黑
巴扎黑

reply all(3)
劉奇

Write ng-mouseleave in the p on the homepage and try it.

黃舟
  1. Try not to do it ng-init, initialize it in the controller

  2. Put ng-show 改成 ng-if
    3. 如果還是不行,用 ng-class to control and try again

習(xí)慣沉默

Just write ng-mouseleave into p.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template