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

Why RouteData has to be immutable? #6672

Closed
shubhamMuttepawar opened this issue Jan 24, 2016 · 5 comments
Closed

Why RouteData has to be immutable? #6672

shubhamMuttepawar opened this issue Jan 24, 2016 · 5 comments

Comments

@shubhamMuttepawar
Copy link

Lets say there is a parent component having two routes path1 and path2 and I want to navigate from path1 to path2 using Router.navigate() and while navigating I want to pass some complex object. I can use RouteParams for simple types but for complex ones I don't see how RouteParams can help and also whatever we pass in RouteParams is visible in URL. I don't want the data to be visible in the URL. Is there any other way to achieve this?
I would also like to know if there is any specific thought process behind keeping RouteData immutable.

@ericmartinezr
Copy link
Contributor

Really? #6569

@shubhamMuttepawar
Copy link
Author

#6569 got closed so I re-opened this one explaining my usecase.

@mwawrusch
Copy link

You might want to read up on REST (https://www.ics.uci.edu/~fielding/pubs/dissertation/top.htm) and other architectural info about how to design web apps. Passing complex objects around while navigating is definitely not the way to go and is in general indicative of design flaws.

If you post more details about your problem (e.g. less abstract) then we might be able to propose a good solution for you.

@shubhamMuttepawar
Copy link
Author

@mwawrusch Yes, then maybe I should review my design again. Thanks for your help.

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants