@ashishbajaj99 wrote:
Hi Guys,
Spent my entire day today trying our various approaches to fix this issue. But I havent yet found the light at the end of the tunnel. Any help from you is very much appreciated.
Essentially I have a change in icon from "ion-person" to "ion-person stalker" that is working very well.
I further have a class called blink that should get active when $scope.blinkUser = true. I see that the controller logic sets this up properly, but for some reason the animation just doesn't happen.If I add the blink class by default, i.e. not using ng-class conditionally, it works fine. Is there a problem with ngAnimate failing for ion-nav-buttons?
Please let me know if this is a known issue? I've googled a lot and tried many work arounds for many issues around ngClass and nav-bar, etc. but nothing seems to work
Thanks,
-Ashishmenu.html:
<ion-nav-buttons side="left"> <button class="button button-icon button-clear ion-navicon" menu-toggle="left"> </button> </ion-nav-buttons> <ion-nav-buttons side="right"> <button class="button button-clear button-icon" ng-class="{'blink': blinkUser, 'ion-person-stalker': superUser, 'ion-person': !superUser}"> </button> </ion-nav-buttons> </ion-nav-bar>
style.css:
@keyframes blink { 0% { color: red; } 100% { color: black; } } @-webkit-keyframes blink { 0% { color: red; } 100% { color: black; } } .blink { -webkit-animation: blink 1s linear infinite; -moz-animation: blink 1s linear infinite; animation: blink 1s linear infinite; }
Code Pen Here:
Login First time with: "user", "secret"
And then navigate to "Security", you will get a pop-up for which you login with: "admin", "secret"The entire goal is to work like "sudo" where temporarily you have admin privileges and then for 10 seconds if you don't move the mouse/touch the screen there is a timeout that will start the blink.
Please see messages in the console to see when the "start blink" messages have started. They will print once per second, and if there is still idle it will automatically logout from admin mode back to user mode.The blink is to show the user that his time is running out due to idle/inactivity on the app window.
Posts: 1
Participants: 1