1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

Different view-transitions depending on navigation

Discussão em 'Angular' iniciado por Fabian Meier, Outubro 5, 2024.

  1. Fabian Meier

    Fabian Meier Guest

    I am building an angular app with multiple pages. Between the pages I have an animated navigation view-transition that slides in the next page from the right. Each page has a back buttons, and these animations should slide to the opposite direction, but I see no way in angular to specify what animation to use.

    Here is a demo: https://stackblitz.com/edit/stackblitz-starters-opqbbp?file=src/main.ts

    I looked at the guide here, it tells me to give a parameter to startViewTransition:

    const t = document.startViewTransition({
    update: updateTheDOMSomehow,
    types: ['slide', direction],
    });


    but

    • startViewTransition does not take any arguments of that kind, and
    • I don't have access to startViewTransition from within angular.

    I expect angular to allow me to set the view transition name somewhere, e.g. in the withViewTransitions setting of the router, but I can't find it.

    Continue reading...

Compartilhe esta Página