-
Notifications
You must be signed in to change notification settings - Fork 10
Exercise 9 - Templates - Buying Socks #33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Exercise 9 - Templates - Buying Socks #33
Conversation
This reverts commit 85d5a69.
excuses, master vergeten te resetten :) volgende PR in orde |
showAlertMessage(message: string, type: string) { | ||
this.alertMessage = message; | ||
this.alertType = type; | ||
this.showAlert = true; |
There was a problem hiding this comment.
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;
}
BUY NOW | ||
</button> | ||
<div *ngIf="showAlert" [ngClass]="alertType" class="alert"> |
There was a problem hiding this comment.
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"> |
There was a problem hiding this comment.
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">
No description provided.