Facebook
From Ja, 3 Years ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 54
  1. <section>
  2.     <table>
  3.       <thead>
  4.         <tr>
  5.           <th>#</th>
  6.           <th>Imię i nazwisko</th>
  7.           <th>Adres e-mail</th>
  8.           <th>Akcje</th>
  9.         </tr>
  10.       </thead>
  11.       <tbody>
  12.         <tr *ngFor="let student of students">
  13.           <td>{{student.id}}</td>
  14.           <td>{{student.name}}</td>
  15.           <td>
  16.             <a href="mailto:{{student.email}}">{{student.email}}</a>
  17.           </td>
  18.           <td>
  19.             <a routerLink="/edit/{{student.id}}" class="button button-green">Edytuj</a>
  20.             <button class="button button-red" (click)="delete(student)">Usuń</button>
  21.           </td>
  22.         </tr>
  23.         <div class="new-student">
  24.           <h2>Dodaj nowego studenta</h2>
  25.           <label for="name">Imię i nazwisko:</label>
  26.           <input type="text" id="name" #name>
  27.        
  28.           <label for="email">Adres e-mail:</label>
  29.           <input type="email" id="email" #email>
  30.        
  31.           <button (click)="add(name.value, email.value); name.value=''; email.value=''">Dodaj</button>
  32.         </div>
  33.  
  34.       </tbody>
  35.     </table>
  36.   </section>