{"action":"created","comment":{"url":"https://api.github.com/repos/junkerm/specmate/pulls/comments/170192597","pull_request_review_id":98841305,"id":170192597,"diff_hunk":"@@ -18,20 +19,26 @@ export class NavigatorService {\n         private dataService: SpecmateDataService,\n         private logger: LoggingService,\n         private router: Router,\n-        private route: ActivatedRoute) {\n+        private route: ActivatedRoute,\n+        private location: Location) {\n+\n+        this.location.subscribe(pse => {","path":"web/src/app/modules/navigation/modules/navigator/services/navigator.service.ts","position":16,"original_position":16,"commit_id":"de0b796c1f657f35d74280206376ce456c29edd9","original_commit_id":"de0b796c1f657f35d74280206376ce456c29edd9","user":{"login":"mikmakmuk","id":720692,"avatar_url":"https://avatars2.githubusercontent.com/u/720692?v=4","gravatar_id":"","url":"https://api.github.com/users/mikmakmuk","html_url":"https://github.com/mikmakmuk","followers_url":"https://api.github.com/users/mikmakmuk/followers","following_url":"https://api.github.com/users/mikmakmuk/following{/other_user}","gists_url":"https://api.github.com/users/mikmakmuk/gists{/gist_id}","starred_url":"https://api.github.com/users/mikmakmuk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikmakmuk/subscriptions","organizations_url":"https://api.github.com/users/mikmakmuk/orgs","repos_url":"https://api.github.com/users/mikmakmuk/repos","events_url":"https://api.github.com/users/mikmakmuk/events{/privacy}","received_events_url":"https://api.github.com/users/mikmakmuk/received_events","type":"User","site_admin":false},"body":"I'm not sure we can. \r\nWe use route to get the currentUrl, which looks for example as follows:\r\n`test-data/Folder-1/Requirement-4`\r\nFrom location, we can get the path, which looks for example as follows:\r\n`/-/Requirement/test-data%2FFolder-1%2FRequirement-4`\r\n\r\nI can urldecode it, but then we still have the basePath which is constructed in `url.ts`. I can implement there a function stripBasePath(path) which would return the url, needed for the dataservice to return the correct element. Would that work?","created_at":"2018-02-23T08:37:19Z","updated_at":"2018-02-23T08:37:19Z","html_url":"https://github.com/junkerm/specmate/pull/111#discussion_r170192597","pull_request_url":"https://api.github.com/repos/junkerm/specmate/pulls/111","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/junkerm/specmate/pulls/comments/170192597"},"html":{"href":"https://github.com/junkerm/specmate/pull/111#discussion_r170192597"},"pull_request":{"href":"https://api.github.com/repos/junkerm/specmate/pulls/111"}},"in_reply_to_id":169889976},"pull_request":{"url":"https://api.github.com/repos/junkerm/specmate/pulls/111","id":170516138,"html_url":"https://github.com/junkerm/specmate/pull/111","diff_url":"https://github.com/junkerm/specmate/pull/111.diff","patch_url":"https://github.com/junkerm/specmate/pull/111.patch","issue_url":"https://api.github.com/repos/junkerm/specmate/issues/111","number":111,"state":"open","locked":false,"title":"Handling the back/forward buttons of browsers in navigation","user":{"login":"mikmakmuk","id":720692,"avatar_url":"https://avatars2.githubusercontent.com/u/720692?v=4","gravatar_id":"","url":"https://api.github.com/users/mikmakmuk","html_url":"https://github.com/mikmakmuk","followers_url":"https://api.github.com/users/mikmakmuk/followers","following_url":"https://api.github.com/users/mikmakmuk/following{/other_user}","gists_url":"https://api.github.com/users/mikmakmuk/gists{/gist_id}","starred_url":"https://api.github.com/users/mikmakmuk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikmakmuk/subscriptions","organizations_url":"https://api.github.com/users/mikmakmuk/orgs","repos_url":"https://api.github.com/users/mikmakmuk/repos","events_url":"https://api.github.com/users/mikmakmuk/events{/privacy}","received_events_url":"https://api.github.com/users/mikmakmuk/received_events","type":"User","site_admin":false},"body":"Two main changes:\r\n1) Use always the subscription on the routing events to handle data retrieval,\r\nnot only when constructing the navigator service. In this way, we load\r\nalso data when the browser back/forward buttons are used for navigation.\r\n2) In order to keep the navigator service history in sync when the\r\nbrowser back/forward buttons are used, we update the history index.","created_at":"2018-02-21T16:12:32Z","updated_at":"2018-02-23T08:37:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ea04da55248b21b407e93295886aed924e17ccfc","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/junkerm/specmate/pulls/111/commits","review_comments_url":"https://api.github.com/repos/junkerm/specmate/pulls/111/comments","review_comment_url":"https://api.github.com/repos/junkerm/specmate/pulls/comments{/number}","comments_url":"https://api.github.com/repos/junkerm/specmate/issues/111/comments","statuses_url":"https://api.github.com/repos/junkerm/specmate/statuses/de0b796c1f657f35d74280206376ce456c29edd9","head":{"label":"junkerm:back-button","ref":"back-button","sha":"de0b796c1f657f35d74280206376ce456c29edd9","user":{"login":"junkerm","id":8638706,"avatar_url":"https://avatars3.githubusercontent.com/u/8638706?v=4","gravatar_id":"","url":"https://api.github.com/users/junkerm","html_url":"https://github.com/junkerm","followers_url":"https://api.github.com/users/junkerm/followers","following_url":"https://api.github.com/users/junkerm/following{/other_user}","gists_url":"https://api.github.com/users/junkerm/gists{/gist_id}","starred_url":"https://api.github.com/users/junkerm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/junkerm/subscriptions","organizations_url":"https://api.github.com/users/junkerm/orgs","repos_url":"https://api.github.com/users/junkerm/repos","events_url":"https://api.github.com/users/junkerm/events{/privacy}","received_events_url":"https://api.github.com/users/junkerm/received_events","type":"User","site_admin":false},"repo":{"id":77048443,"name":"specmate","full_name":"junkerm/specmate","owner":{"login":"junkerm","id":8638706,"avatar_url":"https://avatars3.githubusercontent.com/u/8638706?v=4","gravatar_id":"","url":"https://api.github.com/users/junkerm","html_url":"https://github.com/junkerm","followers_url":"https://api.github.com/users/junkerm/followers","following_url":"https://api.github.com/users/junkerm/following{/other_user}","gists_url":"https://api.github.com/users/junkerm/gists{/gist_id}","starred_url":"https://api.github.com/users/junkerm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/junkerm/subscriptions","organizations_url":"https://api.github.com/users/junkerm/orgs","repos_url":"https://api.github.com/users/junkerm/repos","events_url":"https://api.github.com/users/junkerm/events{/privacy}","received_events_url":"https://api.github.com/users/junkerm/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/junkerm/specmate","description":null,"fork":false,"url":"https://api.github.com/repos/junkerm/specmate","forks_url":"https://api.github.com/repos/junkerm/specmate/forks","keys_url":"https://api.github.com/repos/junkerm/specmate/keys{/key_id}","collaborators_url":"https://api.github.com/repos/junkerm/specmate/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/junkerm/specmate/teams","hooks_url":"https://api.github.com/repos/junkerm/specmate/hooks","issue_events_url":"https://api.github.com/repos/junkerm/specmate/issues/events{/number}","events_url":"https://api.github.com/repos/junkerm/specmate/events","assignees_url":"https://api.github.com/repos/junkerm/specmate/assignees{/user}","branches_url":"https://api.github.com/repos/junkerm/specmate/branches{/branch}","tags_url":"https://api.github.com/repos/junkerm/specmate/tags","blobs_url":"https://api.github.com/repos/junkerm/specmate/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/junkerm/specmate/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/junkerm/specmate/git/refs{/sha}","trees_url":"https://api.github.com/repos/junkerm/specmate/git/trees{/sha}","statuses_url":"https://api.github.com/repos/junkerm/specmate/statuses/{sha}","languages_url":"https://api.github.com/repos/junkerm/specmate/languages","stargazers_url":"https://api.github.com/repos/junkerm/specmate/stargazers","contributors_url":"https://api.github.com/repos/junkerm/specmate/contributors","subscribers_url":"https://api.github.com/repos/junkerm/specmate/subscribers","subscription_url":"https://api.github.com/repos/junkerm/specmate/subscription","commits_url":"https://api.github.com/repos/junkerm/specmate/commits{/sha}","git_commits_url":"https://api.github.com/repos/junkerm/specmate/git/commits{/sha}","comments_url":"https://api.github.com/repos/junkerm/specmate/comments{/number}","issue_comment_url":"https://api.github.com/repos/junkerm/specmate/issues/comments{/number}","contents_url":"https://api.github.com/repos/junkerm/specmate/contents/{+path}","compare_url":"https://api.github.com/repos/junkerm/specmate/compare/{base}...{head}","merges_url":"https://api.github.com/repos/junkerm/specmate/merges","archive_url":"https://api.github.com/repos/junkerm/specmate/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/junkerm/specmate/downloads","issues_url":"https://api.github.com/repos/junkerm/specmate/issues{/number}","pulls_url":"https://api.github.com/repos/junkerm/specmate/pulls{/number}","milestones_url":"https://api.github.com/repos/junkerm/specmate/milestones{/number}","notifications_url":"https://api.github.com/repos/junkerm/specmate/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/junkerm/specmate/labels{/name}","releases_url":"https://api.github.com/repos/junkerm/specmate/releases{/id}","deployments_url":"https://api.github.com/repos/junkerm/specmate/deployments","created_at":"2016-12-21T12:10:02Z","updated_at":"2018-01-15T10:20:10Z","pushed_at":"2018-02-23T06:52:42Z","git_url":"git://github.com/junkerm/specmate.git","ssh_url":"git@github.com:junkerm/specmate.git","clone_url":"https://github.com/junkerm/specmate.git","svn_url":"https://github.com/junkerm/specmate","homepage":null,"size":250058,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":2,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":0,"open_issues":2,"watchers":0,"default_branch":"develop"}},"base":{"label":"junkerm:develop","ref":"develop","sha":"f39b80fd5d0d000bbc082dbcbbca5a634b3c59d6","user":{"login":"junkerm","id":8638706,"avatar_url":"https://avatars3.githubusercontent.com/u/8638706?v=4","gravatar_id":"","url":"https://api.github.com/users/junkerm","html_url":"https://github.com/junkerm","followers_url":"https://api.github.com/users/junkerm/followers","following_url":"https://api.github.com/users/junkerm/following{/other_user}","gists_url":"https://api.github.com/users/junkerm/gists{/gist_id}","starred_url":"https://api.github.com/users/junkerm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/junkerm/subscriptions","organizations_url":"https://api.github.com/users/junkerm/orgs","repos_url":"https://api.github.com/users/junkerm/repos","events_url":"https://api.github.com/users/junkerm/events{/privacy}","received_events_url":"https://api.github.com/users/junkerm/received_events","type":"User","site_admin":false},"repo":{"id":77048443,"name":"specmate","full_name":"junkerm/specmate","owner":{"login":"junkerm","id":8638706,"avatar_url":"https://avatars3.githubusercontent.com/u/8638706?v=4","gravatar_id":"","url":"https://api.github.com/users/junkerm","html_url":"https://github.com/junkerm","followers_url":"https://api.github.com/users/junkerm/followers","following_url":"https://api.github.com/users/junkerm/following{/other_user}","gists_url":"https://api.github.com/users/junkerm/gists{/gist_id}","starred_url":"https://api.github.com/users/junkerm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/junkerm/subscriptions","organizations_url":"https://api.github.com/users/junkerm/orgs","repos_url":"https://api.github.com/users/junkerm/repos","events_url":"https://api.github.com/users/junkerm/events{/privacy}","received_events_url":"https://api.github.com/users/junkerm/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/junkerm/specmate","description":null,"fork":false,"url":"https://api.github.com/repos/junkerm/specmate","forks_url":"https://api.github.com/repos/junkerm/specmate/forks","keys_url":"https://api.github.com/repos/junkerm/specmate/keys{/key_id}","collaborators_url":"https://api.github.com/repos/junkerm/specmate/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/junkerm/specmate/teams","hooks_url":"https://api.github.com/repos/junkerm/specmate/hooks","issue_events_url":"https://api.github.com/repos/junkerm/specmate/issues/events{/number}","events_url":"https://api.github.com/repos/junkerm/specmate/events","assignees_url":"https://api.github.com/repos/junkerm/specmate/assignees{/user}","branches_url":"https://api.github.com/repos/junkerm/specmate/branches{/branch}","tags_url":"https://api.github.com/repos/junkerm/specmate/tags","blobs_url":"https://api.github.com/repos/junkerm/specmate/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/junkerm/specmate/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/junkerm/specmate/git/refs{/sha}","trees_url":"https://api.github.com/repos/junkerm/specmate/git/trees{/sha}","statuses_url":"https://api.github.com/repos/junkerm/specmate/statuses/{sha}","languages_url":"https://api.github.com/repos/junkerm/specmate/languages","stargazers_url":"https://api.github.com/repos/junkerm/specmate/stargazers","contributors_url":"https://api.github.com/repos/junkerm/specmate/contributors","subscribers_url":"https://api.github.com/repos/junkerm/specmate/subscribers","subscription_url":"https://api.github.com/repos/junkerm/specmate/subscription","commits_url":"https://api.github.com/repos/junkerm/specmate/commits{/sha}","git_commits_url":"https://api.github.com/repos/junkerm/specmate/git/commits{/sha}","comments_url":"https://api.github.com/repos/junkerm/specmate/comments{/number}","issue_comment_url":"https://api.github.com/repos/junkerm/specmate/issues/comments{/number}","contents_url":"https://api.github.com/repos/junkerm/specmate/contents/{+path}","compare_url":"https://api.github.com/repos/junkerm/specmate/compare/{base}...{head}","merges_url":"https://api.github.com/repos/junkerm/specmate/merges","archive_url":"https://api.github.com/repos/junkerm/specmate/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/junkerm/specmate/downloads","issues_url":"https://api.github.com/repos/junkerm/specmate/issues{/number}","pulls_url":"https://api.github.com/repos/junkerm/specmate/pulls{/number}","milestones_url":"https://api.github.com/repos/junkerm/specmate/milestones{/number}","notifications_url":"https://api.github.com/repos/junkerm/specmate/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/junkerm/specmate/labels{/name}","releases_url":"https://api.github.com/repos/junkerm/specmate/releases{/id}","deployments_url":"https://api.github.com/repos/junkerm/specmate/deployments","created_at":"2016-12-21T12:10:02Z","updated_at":"2018-01-15T10:20:10Z","pushed_at":"2018-02-23T06:52:42Z","git_url":"git://github.com/junkerm/specmate.git","ssh_url":"git@github.com:junkerm/specmate.git","clone_url":"https://github.com/junkerm/specmate.git","svn_url":"https://github.com/junkerm/specmate","homepage":null,"size":250058,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":2,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":0,"open_issues":2,"watchers":0,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/junkerm/specmate/pulls/111"},"html":{"href":"https://github.com/junkerm/specmate/pull/111"},"issue":{"href":"https://api.github.com/repos/junkerm/specmate/issues/111"},"comments":{"href":"https://api.github.com/repos/junkerm/specmate/issues/111/comments"},"review_comments":{"href":"https://api.github.com/repos/junkerm/specmate/pulls/111/comments"},"review_comment":{"href":"https://api.github.com/repos/junkerm/specmate/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/junkerm/specmate/pulls/111/commits"},"statuses":{"href":"https://api.github.com/repos/junkerm/specmate/statuses/de0b796c1f657f35d74280206376ce456c29edd9"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"mikmakmuk"}}