Read more

Partially disable animations for Angular 1.4+

Deleted user #4117
February 01, 2017Software engineer

If you use Angular 1.4+ together with Angular Animate, all ng-show, ng-hide, ng-class etc. are animated on default.

Illustration UI/UX Design

UI/UX Design by makandra brand

We make sure that your target audience has the best possible experience with your digital product. You get:

  • Design tailored to your audience
  • Proven processes customized to your needs
  • An expert team of experienced designers
Read more Show archive.org snapshot

If you want only some elements to be animated there are 2 possibilities: Either disable animations globally and only run animations if the element has a certain class or enable animations globally and add a certain class if no animation is wanted.

Option 1: Enable animations only for html elements with class 'animate'

@app.config ['$animateProvider', ($animateProvider) ->
  $animateProvider.classNameFilter(/\banimate\b/)
]

Option 2: Disable animations only for elements with class 'no-animate'

@app.config ['$animateProvider', ($animateProvider) ->
  $animateProvider.classNameFilter(/^(?:(?!no-animate).)*$/)
]
Posted to makandra dev (2017-02-01 18:33)