Skip to content
Loading
App Component 
  1.   
 
+2
  • Sachin Singh
    +2
    include HomeComponent inside AppComponent. Means 
    1.   
     The above directive should be inside app.component.html
    +2
  • +2
    Hi,
     
    If I add app component app home, this time it shows home on all pages. 
    +2
  • +2
    Hi,
     
    As seen in the pictures, the home component seems to be going in the browser url. But when I check the browser, it seems that it is still logged in. In this case, the menu on the left does not open. If I refresh the page it is fixed. So why is the router not routing in the first place? How is this problem solved. I would be glad if it helps.
     
    this.service.login(value).subscribe(res=>{
    this.router.navigate(['./']);
    }
     
     
    Route 
     
    1. const routes: Routes = [  
    2.   { path: '', component: HomeComponent },  
    3.     { path: 'login', component: LoginComponent },    
     
     
     
    +2