The speed at which Angular is hiding elements is too rapid for any animation to keep up with

Utilizing Angular 1.2 in conjunction with the animate.css library available at

The animations I'm implementing are geared towards simple ng-show="somevalue". The ng-show animations are functioning properly, smoothly fading in. However, when the element is supposed to be hidden, it vanishes before the fadeout animation can take effect.

I have attempted using classes like .fader.ng-hide-add-active, .fader.ng-hide-add, but the transition does not appear. The element disappears instantaneously instead.

.fader.ng-hide-remove {
    -webkit-animation: fadeIn 1s;
    -moz-animation: fadeIn 1s;
    -o-animation: fadeIn 1s;
    animation: fadeIn 1s;
}

.fader.ng-hide-add-active {
    -webkit-animation: fadeOut 1s;
    -moz-animation: fadeOut 1s;
    -o-animation: fadeOut 1s;
    animation: fadeOut 1s;
} 

Answer №1

Make the change by naming it .fader.ng-hide-add and including display: block !important;:

.fader.ng-hide-add {
  -webkit-animation: fadeOut 1s;
  -moz-animation: fadeOut 1s;
  -o-animation: fadeOut 1s;
  animation: fadeOut 1s;
  display: block !important;
}

This adjustment is necessary to replace the default ng-hide style of display: none.

See a demo here: http://plnkr.co/edit/oUVa7OFddIKIayx6c4aU?p=preview

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

I'm feeling confused about the breaking change in Angular 1.4.0 and its select feature

Today, a new version of angular (1.4.0) has just been released. According to the changelog, there is a notable change regarding "selects". In the past, I used selects in this manner: controller snippet: // Setting default selection $scope.filters = { ...

Easily visualize the JSON object hierarchy within Eclipse using JavaScript

Is there a way to view the JSON parse objects structure in Eclipse without using console.log() in Chrome due to cross domain issues? I need assistance with how to view the [object Object] returned structure from Json.Parse. ...

load a particular section of another website into my own div

Similar Question: Ways to bypass the same-origin policy I've been looking for a way to load a specific div from another website using this code. Can anyone provide an example of how to do this on jsfiddle? $.ajax({ url: 'http://somethin ...

The .find() function conveniently jumps over the table directly following its parent element

After clicking on Inner Add Row, the correct row is added from the .charts-series table. However, when I click on Outer Add Row, a row from the .charts-series table is added instead of one from the .charts table. Here is the link to the example: http://jsf ...

Error message: The module '{0}' is unavailable due to folder naming conflict in Angular

Encountering a strange issue while trying to load an Angular module. The file structure I have is as follows: -ng-app -app -account accountCtrl.js.coffee -auth authCtrl.js.coffee -other_folders ...

Implementing a ranking system in Rails 4

After diving into the world of ranked model and exploring a useful tutorial on sortable tables, I find myself struggling with an issue that's making me pull my hair out! The core problem lies in managing the sorting of cards within a deck on the deck ...

Scrollbar in iframe disappears when using Chrome on a Mac computer

In my webpage, I have a full-page iframe that behaves strangely in Chrome. The scroll bar appears initially but then disappears, making it invisible even though the space for it is still there. Oddly enough, it works perfectly on Safari and Firefox as well ...

Applying a class to a specific element within another element using jQuery

This section pertains to a user account. When the user clicks on the edit button, I would like an edit box to appear within the same element as the button. Here is the HTML markup: <div class="col account"> <strong>Account Settings</st ...

Perform the function prior to making any adjustments to the viewmodel attributes

Within my view, I am showcasing employee details with a checkbox labeled Receive Daily Email. When a user interacts with this checkbox, I want to trigger an AJAX function to validate whether the user is allowed to modify this setting: If the result is tru ...

What is the best way to eliminate the space between the navbar and header?

Is there a way to remove the white gaps that appear before and after the header? I would appreciate any help in editing my code, as I am new to coding and have copied some of it from W3Schools. Here is a snippet of my code: <!DOCTYPE html PUBLIC " ...

Ways to integrate functionality to this particular button

I am facing a restriction where the button only accepts "$dismiss()" function. However, I need it to accept any other function as well. var modalInstance = $uibModal.open({ animation: this.animationsEnabled, ariaLabelledBy: 'modal-title', ariaDe ...

Using Ionic/Angular ion-datetime with specific conditions

In my Ionic app, I have a datetime picker where users can select a time, but with one condition: If the hour is equal to '21', then the minutes must be set to '00' (not '30'). For all other hours, the minutes can be either &ap ...

Formatting tables

Below is the table structure that I have. I attempted to insert empty tds divs in order to achieve the formatting shown in the image, but I have not been successful. Any suggestions or ideas would be greatly appreciated. <table border="0" cellpadding=" ...

Manipulate an image by hiding it, altering its contents, and then displaying it

I am seeking the most effective method to accomplish the following task: $("#some-image").fadeOut(); $("#some-image").attr("src", "new-src.png"); $("#some-image").fadeIn(); For timing purposes, the code below is a step closer, but it still needs improvem ...

The image referenced in the assets folder could not be located within the SCSS

Although I've come across similar questions, none of the solutions provided seem to work for me. I've tried them all, but they just don't seem to do the trick. My goal is quite simple - I just want to set a background image using CSS. Howev ...

Using the global value in a Javascript replace() function causes ng-bind-html to malfunction

When trying to utilize ng-bind-html alongside JavaScript's replace() function, everything works smoothly without using a global value in the replace(). However, as soon as I add something like replace(/test/g, 'TEST'), an error appears in th ...

Angular - The answer to intricate router parameters management with hyperlink addresses

I have a unique feature in my card design where I want users to be able to open the content in a new tab by using their mouse's middle button. To achieve this, I added a link <a> with an automatically generated href for each card. However, there ...

Guide to incorporating navigation buttons (back and forward) in a modal box

I have successfully created image thumbnails and linked them using the provided code. <!DOCTYPE html> <html> <head> <script src="https://code.jquery.com/jquery-2.2.3.min.js"></script> <script src="https://maxcdn.bootstra ...

Activate the jQuery plugin once new content has been loaded via AJAX

Currently, I am utilizing the PopEasy jQuery plugin to display modal forms. It is functioning correctly when the trigger links and the DIV containing the modal form are present in the main document alongside $(document).ready(function(){... which initial ...

Downloading the file from the specified URL is taking too much time when using the save as blob function

I have developed a service to retrieve and save files from a specified URL. (function() { angular.module('SOME_APP') .service("downloadService", downloadService); function downloadService($http){ var downloadFil ...