title: Why does navigation not work after login in angular
body: <p><br>
  I'm learning spring boot and angular, i need your help. <br>
  When handling with JWT authentication, router.navigate() doesn't work despite it returns the JWT token. If I use console.log after the router navigation, it's also executed. 
  <br> Here's the concerned method: </p>
  
  <pre><code>handleJWTAuthLogin(){
  this.basicAuthenticationService.executeJWTAuthenticationService(this.username,this.password)
    .subscribe(
      data =&gt; {
        console.log(this.username)
        console.log(data)
        this.invalidLogin=false
        this.router.navigate(['welcome',this.username])
      },
      error =&gt;{
        console.log(error)
        this.invalidLogin=true
      }
    )
  </code></pre>
  
  <p>} 
  <br><br>
  This is my app-routing.module.ts 
  <br>
  <code>{path:'' , component:LoginComponent},
    {path:'login' , component:LoginComponent},
    {path:'welcome/:name' , component:WelcomeComponent, canActivate:[RouteGuardService]},
    {path:'logout' , component:LogoutComponent, canActivate:[RouteGuardService]},
    {path:'**' , component:ErrorComponent}</code></p>