Dynamic redirect in Angular 14?

Please include the following information in your post:

  • Which SDK this is regarding:
  • SDK Version: 1.10/0
  • Platform Version: Angular 14
  • Code Snippets/Error Messages/Supporting Details/Screenshots:

onLoginWithRedirect(): void {
this.authService.loginWithRedirect( {
appState: { target: ‘/’ },
} );
}

I need to redirect dynamically. how can I get a handle on that?