Login/logOut fixed

master
Aurian JAULT 11 months ago
parent aa1f297106
commit 007772da75

@ -1,8 +1,10 @@
<nav> <nav>
<ul> <ul>
<li><a routerLink="/" routerLinkActive="active" ariaCurrentWhenActive="page">{{ 'title' | transloco }}</a></li> <li><a routerLink="/" routerLinkActive="active" ariaCurrentWhenActive="page">{{ 'title' | transloco }}</a></li>
<li *ngIf="islogged; else elseBlock"><a routerLink="/logout" routerLinkActive="active" ariaCurrentWhenActive="page">{{ 'logout' | transloco }}</a></li> <li *ngIf="isLogged; else elseBlock"><a routerLink="/logout" routerLinkActive="active" ariaCurrentWhenActive="page">{{ 'logout' | transloco }}</a></li>
<li #elseBlock><a routerLink="/login" routerLinkActive="active" ariaCurrentWhenActive="page">{{ 'login' | transloco }}</a></li> <ng-template #elseBlock>
<li><a routerLink="/login" routerLinkActive="active" ariaCurrentWhenActive="page">{{ 'login' | transloco }}</a></li>
</ng-template>
<li><a routerLink="/recipe/add" routerLinkActive="active" ariaCurrentWhenActive="page">{{ 'recipe.add.link' | transloco }}</a></li> <li><a routerLink="/recipe/add" routerLinkActive="active" ariaCurrentWhenActive="page">{{ 'recipe.add.link' | transloco }}</a></li>
<select (change)="changeLanguage($event)"> <select (change)="changeLanguage($event)">

@ -16,6 +16,7 @@ import { NgIf } from '@angular/common';
RecipeFormComponent, RecipeFormComponent,
RecipeListComponent, RecipeListComponent,
TranslocoPipe, TranslocoPipe,
NgIf,
], ],
providers: [RecipeService, TranslocoService, NgIf], providers: [RecipeService, TranslocoService, NgIf],
templateUrl: './app.component.html', templateUrl: './app.component.html',

Loading…
Cancel
Save