{"action":"created","issue":{"url":"https://api.github.com/repos/angular/angular/issues/9798","repository_url":"https://api.github.com/repos/angular/angular","labels_url":"https://api.github.com/repos/angular/angular/issues/9798/labels{/name}","comments_url":"https://api.github.com/repos/angular/angular/issues/9798/comments","events_url":"https://api.github.com/repos/angular/angular/issues/9798/events","html_url":"https://github.com/angular/angular/issues/9798","id":163675787,"number":9798,"title":"Angular 2 Router to hide browser url parameter Id's and give alias names","user":{"login":"vijender1256","id":12258728,"avatar_url":"https://avatars.githubusercontent.com/u/12258728?v=3","gravatar_id":"","url":"https://api.github.com/users/vijender1256","html_url":"https://github.com/vijender1256","followers_url":"https://api.github.com/users/vijender1256/followers","following_url":"https://api.github.com/users/vijender1256/following{/other_user}","gists_url":"https://api.github.com/users/vijender1256/gists{/gist_id}","starred_url":"https://api.github.com/users/vijender1256/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vijender1256/subscriptions","organizations_url":"https://api.github.com/users/vijender1256/orgs","repos_url":"https://api.github.com/users/vijender1256/repos","events_url":"https://api.github.com/users/vijender1256/events{/privacy}","received_events_url":"https://api.github.com/users/vijender1256/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-07-04T13:20:54Z","updated_at":"2016-07-06T13:38:35Z","closed_at":null,"body":"I am trying to route from EmployeeLIst to employeeDetail after I click on employee with ID 23. How do I route to employeeDetail/23 but on browser URL  show the user an alias like /EmployeeDetails?\r\n\r\nBackground\r\n\r\nI'm trying to implement Angular 2 routing and when I went to the detail section I see:\r\n\r\nhttp://localhost:3444/employeedetail/23.\r\n\r\nHere I want to hide that 23 on the browser URL, why do i want to show the ID which can be sensitive. In UI-Router we used to have URL=\"something\" and that URL is visible on the browser URL. Don't we have similar in Angular2 like passing RouteParams and have custom name on the browser URL instead of the Route name itself.\r\n\r\nExample\r\n\r\nhttp://plnkr.co/edit/QgehylornOgXhTaZX8Yn?p=preview\r\n\r\n`{path: 'crisis-center/:id/:id2', component: CrisisDetailComponent}`\r\n\r\nI want to hide those IDs on the browser URL and instead present an alias route name."},"comment":{"url":"https://api.github.com/repos/angular/angular/issues/comments/230773557","html_url":"https://github.com/angular/angular/issues/9798#issuecomment-230773557","issue_url":"https://api.github.com/repos/angular/angular/issues/9798","id":230773557,"user":{"login":"vijender1256","id":12258728,"avatar_url":"https://avatars.githubusercontent.com/u/12258728?v=3","gravatar_id":"","url":"https://api.github.com/users/vijender1256","html_url":"https://github.com/vijender1256","followers_url":"https://api.github.com/users/vijender1256/followers","following_url":"https://api.github.com/users/vijender1256/following{/other_user}","gists_url":"https://api.github.com/users/vijender1256/gists{/gist_id}","starred_url":"https://api.github.com/users/vijender1256/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vijender1256/subscriptions","organizations_url":"https://api.github.com/users/vijender1256/orgs","repos_url":"https://api.github.com/users/vijender1256/repos","events_url":"https://api.github.com/users/vijender1256/events{/privacy}","received_events_url":"https://api.github.com/users/vijender1256/received_events","type":"User","site_admin":false},"created_at":"2016-07-06T13:38:35Z","updated_at":"2016-07-06T13:38:35Z","body":"@DavideViolante Thanks for the reply, but I think this was possible in angular 1 using ui-router:\r\n\r\n ```\r\n.state(\"dashboardException\", {\r\n            url: \"/MyChoiceOnBrowser\",\r\n            templateUrl: \"app/Dashboard/exceptiondashboard.html\",\r\n            controller: 'exceptiondashboardcontroller',\r\n            controllerAs: \"vm\"\r\n        })\r\n```\r\n\r\nIn above code the  after passing stateParams to the controller, we can read those parameters and then show \"MyChoiceOnBrowser\" as the browser URL, here we are not showing the stateParams that are passed to the controller.\r\n\r\nDoes this mean Angular2 dont have this option but Angular 1 has it ?\r\n\r\nI dont want to show the queryParams on the browser URL what if it is employeeId that is unique but I dont want users to see ?\r\n\r\nAnyone have solution for this ?\r\n"}}
{"actor":{"display_login":"vijender1256"}}