{"action":"created","issue":{"url":"https://api.github.com/repos/NativeScript/nativescript-angular/issues/240","repository_url":"https://api.github.com/repos/NativeScript/nativescript-angular","labels_url":"https://api.github.com/repos/NativeScript/nativescript-angular/issues/240/labels{/name}","comments_url":"https://api.github.com/repos/NativeScript/nativescript-angular/issues/240/comments","events_url":"https://api.github.com/repos/NativeScript/nativescript-angular/issues/240/events","html_url":"https://github.com/NativeScript/nativescript-angular/issues/240","id":155260548,"number":240,"title":"Angular Location.replaceState(\"<path>\") not working","user":{"login":"manjunathshetty","id":13759916,"avatar_url":"https://avatars.githubusercontent.com/u/13759916?v=3","gravatar_id":"","url":"https://api.github.com/users/manjunathshetty","html_url":"https://github.com/manjunathshetty","followers_url":"https://api.github.com/users/manjunathshetty/followers","following_url":"https://api.github.com/users/manjunathshetty/following{/other_user}","gists_url":"https://api.github.com/users/manjunathshetty/gists{/gist_id}","starred_url":"https://api.github.com/users/manjunathshetty/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/manjunathshetty/subscriptions","organizations_url":"https://api.github.com/users/manjunathshetty/orgs","repos_url":"https://api.github.com/users/manjunathshetty/repos","events_url":"https://api.github.com/users/manjunathshetty/events{/privacy}","received_events_url":"https://api.github.com/users/manjunathshetty/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-05-17T13:33:01Z","updated_at":"2016-05-19T12:24:36Z","closed_at":null,"body":"Here is the code sample \r\n\r\n```\r\nimport { Location } from '@angular/common';\r\n...\r\nconstructor(private _page: Page, private _router: Router, private _location:Location) {\r\n\r\n }\r\n....\r\nngOnInit(){\r\n        console.log(\"Initiating Home View\");\r\n        if(!this.isLoggedIn){\r\n            console.log(\"Not logged in. Navigating to main page\");\r\n            this._location.replaceState('/main');\r\n        }\r\n    }\r\n\r\n```\r\n I am getting this error \r\n\r\n```\r\nError: Not implemented\r\nJS:     at NSLocationStrategy.replaceState (/data/data/org.nativescript.scrap/files/app/tns_modules/nativescript-angular/router/ns-location-strategy.js:42:15)\r\nJS:     at Location.replaceState (/data/data/org.nativescript.scrap/files/app/tns_modules/@angular/common/src/location/location.js:55:31)\r\nJS:     at HomeComponent.ngOnInit (/data/data/org.nativescript.scrap/files/app/components/home.component.js:15:28)\r\nJS:     at DebugAppView._View_HomeComponent_Host0.detectChangesInternal (HomeComponent_Host.template.js:28:92)\r\nJS:     at DebugAppView.AppView.detectChanges (/data/data/org.nativescript.scrap/files/app/tns_modules/@angular/core/src/linker/view.js:200:14)\r\nJS:     at DebugAppView.detectChanges (/data/data/org.nativescript.scrap/files/app/tns_modules/@angular/core/src/linker/view.js:289:44)\r\nJS:     at DebugAppView.AppView.detectContentChildrenChanges (/data/data/org.nativescript.scrap/files/app/tns_modules/@angular/core/src/linker/view.js:215:37)\r\nJS:     at DebugAppView.AppView.detectChangesInternal (/data/data/org.nativescript.scrap/files/app/tns_modules/@angular/core/src/linker/view.js:210:14)\r\nJS:     at DebugAppView.AppView.detectChanges (/data/data/org.nativescript.scrap/files/app/tns_modules/@angular/core/src/linker/view.js:200:14)\r\nJS:     at DebugAppView.detect\r\n\r\n```"},"comment":{"url":"https://api.github.com/repos/NativeScript/nativescript-angular/issues/comments/220308707","html_url":"https://github.com/NativeScript/nativescript-angular/issues/240#issuecomment-220308707","issue_url":"https://api.github.com/repos/NativeScript/nativescript-angular/issues/240","id":220308707,"user":{"login":"nsndeck","id":5665150,"avatar_url":"https://avatars.githubusercontent.com/u/5665150?v=3","gravatar_id":"","url":"https://api.github.com/users/nsndeck","html_url":"https://github.com/nsndeck","followers_url":"https://api.github.com/users/nsndeck/followers","following_url":"https://api.github.com/users/nsndeck/following{/other_user}","gists_url":"https://api.github.com/users/nsndeck/gists{/gist_id}","starred_url":"https://api.github.com/users/nsndeck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nsndeck/subscriptions","organizations_url":"https://api.github.com/users/nsndeck/orgs","repos_url":"https://api.github.com/users/nsndeck/repos","events_url":"https://api.github.com/users/nsndeck/events{/privacy}","received_events_url":"https://api.github.com/users/nsndeck/received_events","type":"User","site_admin":false},"created_at":"2016-05-19T12:24:36Z","updated_at":"2016-05-19T12:24:36Z","body":"Indeed this method is not implemented you could use `router.navigate` instead:\r\n\r\n```JavaScript\r\nthis._router.navigate('/main');\r\n```"}}