A
A
Alex Krynytskyi2020-09-29 14:17:52
JavaScript
Alex Krynytskyi, 2020-09-29 14:17:52

Is it possible to make the ngSwitch directive fade in?

Is it possible to make the ngSwitch directive fade in?

As I understand it, it removes the element from the tree house abruptly, but I would like it to download to become opacity = 0 for 0.3 seconds and then leave the tree house.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Demian Smith, 2020-09-29
@search

Yes, this can be done using the Angular animation system.
Here is an example of how animation is implemented for ngFor https://stackblitz.com/edit/ng-animations?file=ani...
The principle is no different from ngSwitch.
You can read more here https://angular.io/guide/transition-and-triggers

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question