<form ng-submit="vm.addTask()"
      layout="row"
      class="add-task-form">

  <md-autocomplete
    tabindex="1"
    ng-blur="vm.onBlur && vm.onBlur()"
    md-selected-item="vm.newTask"
    md-search-text="vm.newTaskTitle"
    md-items="task in vm.getFilteredTaskSuggestions(vm.newTaskTitle)"
    md-item-text="task.title"
    md-min-length="2"
    autofocus-autocomplete
    placeholder="Select or create a task">
    <md-item-template>
          <span md-highlight-text="vm.newTaskTitle"
                md-highlight-flags="i">{{task.title}}</span>
    </md-item-template>
    <!--<md-not-found>-->
      <!--<i>Create task</i> "{{vm.newTaskTitle}}"-->
    <!--</md-not-found>-->
  </md-autocomplete>
</form>
