[ Web Proxy ]
URL:
Viewing: https://angular.dev/api/router/RedirectFunction [Back]  [Original]

RedirectFunction Angular Skip to main content
menu
close
more_horiz
menuAPI
@angular/router

RedirectFunction

Type Alias
stable

The type for the function that can be used to handle redirects when the path matches a Route config.

Route#redirectTo

On this page

    arrow_upward_alt Back to the top

    API

        
          type RedirectFunction = (  redirectData: PartialMatchRouteSnapshot,) => MaybeAsync<string | UrlTree>
        
        

    Description

    The type for the function that can be used to handle redirects when the path matches a Route config.

    The RedirectFunction does not have access to the full ActivatedRouteSnapshot interface because Route matching has not yet completed when the function is called. See PartialMatchRouteSnapshot for more information.

    Jump to details

    Web Proxy Viewer  |  New URL  |  Original Page