Skip to content

Conversation

@jonathanrasquin
Copy link

No description provided.

@jonathanrasquin
Copy link
Author

excuses, master vergeten te resetten :) volgende PR in orde

showAlertMessage(message: string, type: string) {
this.alertMessage = message;
this.alertType = type;
this.showAlert = true;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minder fields, minder dingen om in sync te houden::

get showAlert(): boolean {
  return !!this.alertMessage;
}

<button type="button" class="buy-socks" (click)="buy()" *ngIf="sock.inventory > 0">
BUY NOW
</button>
<div *ngIf="showAlert" [ngClass]="alertType" class="alert">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Of hier gewoon: *ngIf="!!alertMessage"


<button type="button" class="buy-socks" (click)="buy()">
<p *ngIf="sock.inventory === 0" class="badge">SOLD OUT</p>
<button type="button" class="buy-socks" (click)="buy()" *ngIf="sock.inventory > 0">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Je hoeft niet altijd een functie te gebruiken:
(is waarschijnlijk ook (persoonlijke) smaak)

<button (click)="showModal = true">

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants