Commit 15ad1652 authored by Cédric Moreau's avatar Cédric Moreau

[fix] Rémanence de la fiche précédente (annonce, fiche vendeur)

parent d52ae6c2
<ion-content padding>
<ion-row>
<ion-col col-12>
<ion-col col-12 *ngIf="accountService.acc.title">
<img class="logo" src="{{ accountService.acc.logo }}">
<h2>{{ accountService.acc.title }}</h2>
<pre>{{ accountService.acc.desc }}</pre>
......
......@@ -21,6 +21,8 @@ export class AccountPage implements OnInit {
if (this.route.snapshot.data.creation) {
this.accountService.beginCreation(loginService.pub)
} else {
this.accountService.clean()
}
}
......
<ion-content padding>
<ion-row>
<ion-col col-12>
<ion-col col-12 *ngIf="announceService.ann.title">
<h2>{{ announceService.ann.title }}</h2>
<p *ngIf="announceService.ann.images.length == 0">Pas d'images pour cette annnonce.</p>
<p>
......
......@@ -20,6 +20,8 @@ export class AnnouncePage implements OnInit {
if (this.route.snapshot.data.creation) {
this.announceService.beginCreation(loginService.pub)
} else {
this.announceService.clean()
}
}
......
......@@ -28,6 +28,10 @@ export class AccountService {
public loginService: LoginService,
public authService: AuthService,
) {
this.clean()
}
clean() {
this.acc = {}
}
......
......@@ -28,6 +28,10 @@ export class AnnounceService {
public authService: AuthService,
public imageService: ImageService
) {
this.clean()
}
clean() {
this.creation = false
this.stockInitial = 1
this.ann = {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment