Hi,
Is there a problem with my build? There are Header and Footer components. There is also Home Component. I am adding App Component only router-outlet.
If I add app component app home, this time it shows home on all pages.
<app-home></app-home>
How should I do in this case?
Header Component - The menus html
Footer Component - The footer html
Home Component
<app-header></app-header>
<div class="content-wrapper">
</div>
<app-footer></app-footer>
App Component
<router-outlet></router-outlet>
my problem is that after logging in it does not redirect to the home page.
When I look at the browser, the page it is directed to still appears as the login page.
what should i do in this situation
Login Component
this.service.login(tvalue.subscribe(res=>{
this.router.navigate(['/home']);
}
Routes
const routes: Routes = [
{path:'',redirectTo:'/login',pathMatch:'full'},
{path:'login',component:LoginComponent},
{ path:'home',component:HomeComponent},