Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

notFoundRedirectNamed issue #666

Closed
busslina opened this issue Jun 27, 2024 · 6 comments
Closed

notFoundRedirectNamed issue #666

busslina opened this issue Jun 27, 2024 · 6 comments

Comments

@busslina
Copy link
Contributor

This is not a bug, but a bad behaviour IMO.

On a web browser, when routing to an inexistent route, it gets redirected correctly to notFoundRedirectNamed, but the browser url got stuck with the wrong route. Is there a way to get it changed to the notFoundRedirectNamed value?

Thanks

BeamerDelegate(
        initialPath: initialPath,
        notFoundRedirectNamed: initialPath,
        locationBuilder: RoutesLocationBuilder(
          routes: routes,
        ).call,
        setBrowserTabTitle: true,
        guards: guards,
      )
@stan-at-work
Copy link

@busslina So you mean the url on top of the browser does not change when notFoundRedirectNamed is ran ?

The way i see it is to just update the browser title if tghe notFoundRedirectNamedis used?

@busslina
Copy link
Contributor Author

So you mean the url on top of the browser does not change when notFoundRedirectNamed is ran ?

Exactly.

The way i see it is to just update the browser title if tghe notFoundRedirectNamedis used?

The browser title is working fine.

Also, guard redirections also works fine. It's just the case of a not found route. It gets well redirected but it keeps the inexistent url path on the browser address. It's acting like an alias, which could be cool if any want it, but also it must be provided a way to refresh with the actual path.

@stan-at-work
Copy link

So you mean the url on top of the browser does not change when notFoundRedirectNamed is ran ?

Exactly.

The way i see it is to just update the browser title if tghe notFoundRedirectNamedis used?

The browser title is working fine.

Also, guard redirections also works fine. It's just the case of a not found route. It gets well redirected but it keeps the inexistent url path on the browser address. It's acting like an alias, which could be cool if any want it, but also it must be provided a way to refresh with the actual path.

For now you can change it yourself... but it needs to be fixed.

You can do that before you return it with the notFoundRedirectNamed: ...

@busslina
Copy link
Contributor Author

busslina commented Sep 5, 2024

You can do that before you return it with the notFoundRedirectNamed: ...

But notFoundRedirectNamed is just a String. How can I change there the browser path?

@stan-at-work
Copy link

You can do that before you return it with the notFoundRedirectNamed: ...

But notFoundRedirectNamed is just a String. How can I change there the browser path?

Do you want to change the browsor path without changing the app state ?

@busslina
Copy link
Contributor Author

Seems this issue got resolved "by itself". So I'm closing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants