<div>
  <ul class="list-inline">
    <li ng-repeat="relation in relations | filter: { source: true }">
      <span class="label label-info">{{ relation.title }}
        <span class="glyphicon glyphicon-remove" ng-click="deleteRelation(relation)" ng-show="!ngDisabled"></span>
      </span>
    </li>
  </ul>
  <input class="form-control" type="text" id="{{ ref }}" placeholder="Type a document title" ng-model="input" ng-disabled="ngDisabled"
    autocomplete="off" typeahead="document.title for document in getDocumentTypeahead($viewValue)"
    typeahead-wait-ms="200" typeahead-on-select="addRelation($item)" />
</div>