<div class="courses-controls">
  <div class="input-group">
    <input type="text"
           class="form-control"
           placeholder="Name fragment or date"
           [(ngModel)]="filterQuery">
    <span class="input-group-btn">
      <button class="btn btn-primary"
              (click)="filter(filterQuery)">Filter</button>
    </span>
  </div>
  <button class="btn btn-primary add-course">Add course</button>
</div>

<div class="courses-controls">
  <form class="input-group"
        (ngSubmit)="filter(filterQuery)">
    <input type="text"
           class="form-control"
           placeholder="Name fragment or date"
           name="filterQuery"
           [(ngModel)]="filterQuery">
    <span class="input-group-btn">
      <button class="btn btn-primary"
              type="submit">Filter</button>
    </span>
  </form>
  <button class="btn btn-primary add-course">Add course</button>
</div>

Update form to submit on enter key press
Update form to submit on enter key press
