I have auth.module
and in this module I need to use login and register module.
I have to button login
and register
.
This is auth.html
:
<div class="container">
<div class="login">
<div class="form">
<div class="formTop">
<div class="signup-label">
<a href="/register">register</a>
</div>
<div class="login-label">
<a routerLink="/login">login</a>
</div>
</div>
<router-outlet></router-outlet>
</div>
<div class="guide">
</div>
</div>
and this is auth routing :
const routes: Routes = [
{
path: '',
component: AuthComponent
},
{
path: 'login',
loadChildren: () => import('./login/login.module').then(x => x.LoginModule)
}
];
this page.routing.module:
const routes: Routes = [
{
path: '',
loadChildren: () => import('./cards/cards.module').then(x => x.CardsModule)
},
{
path: 'auth',
loadChildren: () => import('./auth/auth.module').then(x => x.AuthModule)
}
];
and this app.routing:
const routes: Routes = [
{
path: '', loadChildren: () => import('./pages/pages.module').then(x => x.PagesModule)
}
];
but when I click the on the login
button it change route and chage page. I need when I click on the login or register change the route but not change the page auth, just change the content of auth.
now how can i solve this ???