Angular : Hide the url parameters in the routing

672 views
Skip to first unread message

Dhinakar Reddy Pothireddi

unread,
Jul 31, 2017, 6:52:25 AM7/31/17
to Angular and AngularJS discussion
Hi,

I am routing from one page to another passing a json object as a parameter this way.

{ path: 'msgwithparams/:id', component: MessageComponent }

this.user.username = 'dhinakar';
this.user.password = 'reddy';
this.router.navigate(['/msgwithparams', JSON.stringify(this.user)]);

so in url I am getting the entire parameter but I want to hide them from showing. I am new to Angular2 dev. Any help is appreciated.

Thanks in advance.
Reply all
Reply to author
Forward
0 new messages