Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
chore(navigation): navigation fixed
  • Loading branch information
valorkin committed Oct 19, 2015
commit 8a9d63b5fc8d56b40d7025374c679fb82ce053e3
2 changes: 1 addition & 1 deletion src/home/home.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export class Home {

logout() {
localStorage.removeItem('jwt');
this.router.parent.navigate(['/login']);
this.router.parent.navigateByUrl('/login');
}

callAnonymousApi() {
Expand Down
6 changes: 3 additions & 3 deletions src/login/login.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ export class Login {
})
.then(status)
.then(json)
.then((response) => {
.then((response:any) => {
localStorage.setItem('jwt', response.id_token);
this.router.parent.navigate(['/home']);
this.router.parent.navigateByUrl('/home');
})
.catch((error) => {
alert(error.message);
Expand All @@ -43,6 +43,6 @@ export class Login {

signup(event) {
event.preventDefault();
this.router.parent.navigate(['/signup']);
this.router.parent.navigateByUrl('/signup');
}
}
6 changes: 3 additions & 3 deletions src/signup/signup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ export class Signup {
})
.then(status)
.then(json)
.then((response) => {
.then((response:any) => {
localStorage.setItem('jwt', response.id_token);
this.router.navigate(['/home']);
this.router.navigateByUrl('/home');
})
.catch((error) => {
alert(error.message);
Expand All @@ -43,7 +43,7 @@ export class Signup {

login(event) {
event.preventDefault();
this.router.parent.navigate(['/login']);
this.router.parent.navigateByUrl('/login');
}

}