How to disable view transitions for a specific router outlet?

Discussão em 'Angular' iniciado por Ali, Janeiro 9, 2025.

  1. Ali

    Ali Guest

    I have enabled view transitions using the withViewTransitions() function in provideRouter().

    Now I like to write a directive or something to be able to disable the transition view for a specific <router-outlet>.

    P.S: I know that we can also use CSS tricks like view-transition-name: disabled to achieve a similar solution... But I don't want to use CSS as it doesn't work in all browsers and devices... For example in some iOS devices even though I defined a CSS rule like ::view-transition-group(disabled) { animation-duration: 0s !important; }, sometimes my fixed positioned header & footer in the page blink and I get weird unexpected results... So maybe a pure standard Angular solution can be a better approach.

    Any help is so much appreciated. Thanks in advance.

    Continue reading...

Compartilhe esta Página