Skip to content

Instantly share code, notes, and snippets.

@ratbeard
Created July 8, 2014 21:04
Show Gist options
  • Select an option

  • Save ratbeard/2655811a397c361746f9 to your computer and use it in GitHub Desktop.

Select an option

Save ratbeard/2655811a397c361746f9 to your computer and use it in GitHub Desktop.
disable-ng-animate classNameFilter
// This allows adding a class of `disable-ng-animate` to an element so that
// $animate won't attempt to add its animation hooks. This is useful when an
// element has animations applied via css classes, which can confuse
// directives like ng-repeat and ng-show sometimes.
app.config( [
'$animateProvider',
function ($animateProvider) {
$animateProvider.classNameFilter(/^((?!disable-ng-animate).)*$/)
}
] )
@m0ngr31
Copy link

m0ngr31 commented Feb 25, 2015

I tried this, but I couldn't get it working. $animate seems to still be running on the element. Any suggestions?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment