modif app-routing-module

This commit is contained in:
Romain Verger 2022-03-01 15:31:13 +01:00
parent 01b68c0899
commit 30f70296ba
2 changed files with 4 additions and 4 deletions

View File

@ -11,7 +11,8 @@ import { AdminPageComponent } from './pages/admin-page/admin-page.component';
import { AuthGuard } from './services/auth.guard';
const routes: Routes = [
{ path: '', redirectTo: 'home', pathMatch: 'full' },
{ path: '', redirectTo: 'signin', pathMatch: 'full' },
{path: 'signin', component: SigninComponent},
{ path: 'home', component: HomePageComponent },
{ path: 'categories', component: ListCategoriesComponent },
{ path: 'favoris', component: FavorisUserComponent },
@ -19,7 +20,6 @@ const routes: Routes = [
{ path: 'Deconnexion', redirectTo: 'home'},
{path: 'restaurants', canActivate: [AuthGuard], component: RestoPageComponent},
{path: 'page-not-found',component: PageNotFoundComponent},
{path: 'signin', component: SigninComponent},
{path: 'admin', component: AdminPageComponent},
{path: '**', redirectTo: 'page-not-found' }
];

View File

@ -16,7 +16,7 @@ export class AppComponent {
//console.log(e);
if(e instanceof NavigationEnd){
console.log(e.url)
if (e.url == "/signin") {
if (e.url == "/") {
this.dontShow = false;
} else {
this.dontShow = true;