Suppression des components sur la page signin
This commit is contained in:
parent
b774a93da7
commit
63906bf345
@ -1,4 +1,4 @@
|
|||||||
<app-search-bar></app-search-bar>
|
<app-search-bar *ngIf="dontShow"></app-search-bar>
|
||||||
<app-nav-bar></app-nav-bar>
|
<app-nav-bar *ngIf="dontShow"></app-nav-bar>
|
||||||
<router-outlet></router-outlet>
|
<router-outlet></router-outlet>
|
||||||
<app-footer></app-footer>
|
<app-footer *ngIf="dontShow"></app-footer>
|
||||||
|
@ -8,11 +8,18 @@ import { NavigationEnd, Router } from '@angular/router';
|
|||||||
})
|
})
|
||||||
export class AppComponent {
|
export class AppComponent {
|
||||||
title = 'simpleat';
|
title = 'simpleat';
|
||||||
|
dontShow: boolean = false;
|
||||||
|
|
||||||
constructor(private router:Router){
|
constructor(private router:Router){
|
||||||
this.router.events.subscribe(e=>{
|
this.router.events.subscribe(e=>{
|
||||||
//console.log(e);
|
//console.log(e);
|
||||||
if(e instanceof NavigationEnd){
|
if(e instanceof NavigationEnd){
|
||||||
console.log(e.url)
|
console.log(e.url)
|
||||||
|
if (e.url == "/signin") {
|
||||||
|
this.dontShow = false;
|
||||||
|
} else {
|
||||||
|
this.dontShow = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<div class="signin-form text-center">
|
<div class="signin-form text-center">
|
||||||
<main class="form-signin">
|
<main class="form-signin d-inline-flex">
|
||||||
<form (ngSubmit)="onSubmit(signinForm)" #signinForm="ngForm">
|
<form (ngSubmit)="onSubmit(signinForm)" #signinForm="ngForm">
|
||||||
<h5>Merci de vous connecter</h5>
|
<h5>Merci de vous connecter</h5>
|
||||||
<img src="../../../assets/images-header/logo.png"><br>
|
<img src="../../../assets/images-header/logo.png"><br>
|
||||||
@ -32,12 +32,12 @@
|
|||||||
<button class="w-100 btn btn-lg btn-danger"
|
<button class="w-100 btn btn-lg btn-danger"
|
||||||
type="submit"
|
type="submit"
|
||||||
[disabled]="signinForm.invalid">Je me connecte !</button>
|
[disabled]="signinForm.invalid">Je me connecte !</button>
|
||||||
<p>
|
<!--<p>
|
||||||
Form is dirty : {{ signinForm.form.dirty }}
|
Form is dirty : {{ signinForm.form.dirty }}
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
Form is touched : {{ signinForm.form.touched }}
|
Form is touched : {{ signinForm.form.touched }}
|
||||||
</p>
|
</p>-->
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<div *ngIf="errorForm">
|
<div *ngIf="errorForm">
|
||||||
|
@ -6,14 +6,13 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.form-signin {
|
.form-signin {
|
||||||
width: 500px;
|
max-width: 500px;
|
||||||
//max-width: 330px;
|
|
||||||
padding: 15px;
|
padding: 15px;
|
||||||
margin: auto;
|
margin: auto;
|
||||||
|
margin-top: 20vh;
|
||||||
background-color: #f0f0f0;
|
background-color: #f0f0f0;
|
||||||
border-radius: 15px;
|
border-radius: 15px;
|
||||||
box-shadow: 10px 10px 10px grey;
|
box-shadow: 10px 10px 10px grey;
|
||||||
margin-top: 25vh;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.form-floating:focus-within {
|
.form-floating:focus-within {
|
||||||
|
Loading…
Reference in New Issue
Block a user