Formular wie in Tutorial ergänzt -- Funzt nicht
[examples/angular-tutorial] / src / app / cart / cart.component.html
1 <h3>Cart</h3>
2
3 <p>
4   <a routerLink="/shipping">Shipping Prices</a>
5 </p>
6
7 <div class="cart-item" *ngFor="let item of items">
8   <span>{{ item.name }}</span>
9   <span>{{ item.price | currency }}</span>
10 </div>
11
12 <form [formGroup]="checkoutForm" (ngSubmit)="onSubmit(checkoutForm.value)">
13
14   <div>
15     <label for="name">
16       Name
17     </label>
18     <input id="name" type="text" formControlName="name">
19   </div>
20
21   <div>
22     <label for="address">
23       Address
24     </label>
25     <input id="address" type="text" formControlName="address">
26   </div>
27
28   <button class="button" type="submit">Purchase</button>
29
30 </form>