fixing the navigation
This commit is contained in:
parent
c993d24484
commit
c40c3436cd
|
@ -56,10 +56,10 @@
|
|||
-->
|
||||
|
||||
<div id="appBody" class="child_div_right">
|
||||
|
||||
<router-outlet [ngClass]="{true:'visible'}[tokenService.isLoggedIn() == true]" ></router-outlet>
|
||||
|
||||
|
||||
|
||||
<router-outlet></router-outlet>
|
||||
|
||||
|
||||
<!--this should be invisible -->
|
||||
<app-main-sign-in [ngClass]="'invisible'"></app-main-sign-in>
|
||||
|
||||
|
|
|
@ -50,7 +50,7 @@ export class AppComponent implements OnInit {
|
|||
login(){
|
||||
console.log("navigating to login")
|
||||
//redirect to login page
|
||||
this.router.navigate(['/login'], { queryParams: { refresh : Math.random() /*,returnUrl: this.state.url*/ }});
|
||||
this.router.navigate(['/login'], { queryParams: { /*refresh : Math.random() ,returnUrl: this.state.url*/ }});
|
||||
location.reload();
|
||||
}
|
||||
|
||||
|
|
|
@ -75,7 +75,6 @@ export class GooggleSignInComponent implements OnInit, AfterViewInit, Injectable
|
|||
//simple_notifier("success",null,"Successful login");
|
||||
let profile = googleUser.getBasicProfile();
|
||||
this.tokenService.login(googleUser.getAuthResponse().id_token, TokenProvider.google, profile.getName(), profile.getEmail());
|
||||
this.router.navigate(['/workspace'], { queryParams: { /*returnUrl: this.state.url*/ }});
|
||||
},
|
||||
function (error) {
|
||||
//simple_notifier("danger",null,"Failed to login");
|
||||
|
|
|
@ -18,8 +18,8 @@ export class UserWorkspaceComponent implements OnInit {
|
|||
|
||||
ngOnInit() {
|
||||
|
||||
if(!this.tokenService.isLoggedIn())
|
||||
this.router.navigate([''], { queryParams: { /*returnUrl: this.state.url*/ }});
|
||||
//if(!this.tokenService.isLoggedIn())
|
||||
//this.router.navigate([''], { queryParams: { /*returnUrl: this.state.url*/ }});
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue