HDJEMAI
HDJEMAI

Reputation: 9800

How to disable ngx-bootstrap modal animation?

Is there a way to disable animation for ngx-bootstrap modal ?

I've tried to add this config but it's not working:

config = {
  animated: false,
  backdrop: 'static'
};

Demo:

https://stackblitz.com/edit/ngx-bootstrap-cwfhnu?file=app%2Fmodal-component%2Fstatic-modal.component.html

The modal is still showing animated.

Because in some cases the modal is showing very slow when used in a more complex web page (something like 2 seconds after a click), so may be it will be better when disabling the animation.

Upvotes: 0

Views: 5140

Answers (1)

IlyaSurmay
IlyaSurmay

Reputation: 2333

Now you can disable animations only when using BsModalService.

Here's an example of its usage:

https://stackblitz.com/edit/ngx-bootstrap-k25ywj?file=app/app.component.ts

this.modalService.show(template, {
   animated: false
});

Upvotes: 5

Related Questions