We are working on Angular migration projects. For that, I have created a Angular 7 app with login & home page. After the successful login of the user login component pass the value to home component. And it is huge data like Page Authorization, roles, Business Units [Around 166 KB]. And service was written in someone.
- I call the service to validate the user and the service returning the data (which means successful login).
I'm using following lines of code to redirect to home page with data
let navigationExtras : NavigationExtras = { queryParams : { "data": JSON.stringify(data) } }; this.route.navigate(['/home'],navigationExtras);In home page following used to get the data
this.route.queryParams .subscribe(params => { this.data= JSON.parse(params["data"]); this.lstUserBusinessUnitDetails = this.data.lstUserBusinessUnitDetails; });
Problem is am getting the data in URL and when I refresh the page getting The connection was reset error. URL looks like below:
http://localhost:4211/home?data=%7B%22lstUserCompanyDetails%22:%5B%5D,%22lstU....
Please advice.