modif app-routing-module
This commit is contained in:
parent
01b68c0899
commit
30f70296ba
2 changed files with 4 additions and 4 deletions
|
@ -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,8 +20,7 @@ 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: 'admin', component: AdminPageComponent},
|
||||
{path: '**', redirectTo: 'page-not-found' }
|
||||
];
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue