
<div class="row">
    <div class="form-group col-md-6">
        <label for="taskUserId">User ID</label>

        <div class="input-group">
            <input type="text" class="form-control" id="taskUserId"
                 [(ngModel)]="userId">
            <span class="input-group-btn">
                <button class="btn btn-default" (click)="update()">Update</button>
            </span>
        </div>
    </div>
</div>

<h1 *ngIf="tasks.length === 0">There are no tasks.</h1>

<table class="table table-striped" *ngIf="tasks.length !== 0">
    <thead>
    <tr>
        <td>Date</td>
        <td>Title</td>
        <td>Description</td>
    </tr>
    </thead>
    <tbody>
    <tr *ngFor="let task of tasks" (click)="taskClicked(task)">
        <td>{{task.dateTime}}</td>
        <td>{{task.title}}</td>
        <td>{{task.description}}</td>
    </tr>
    </tbody>
</table>
