<span class="source-ref-link-element">
  <span ng-switch on="getKind(ref)">
    <!-- Branch -->
    <span ng-switch-when="heads">
      <i class="fa fa-code-fork" data-container="body" data-title="Branch" bs-tooltip></i>
      <a ng-href="{{ getUrl(ref, branchTemplate, 'branch') }}" target="_blank">{{ getTitle(ref) }}</a>
    </span>

    <!-- Tag -->
    <span ng-switch-when="tags">
      <i class="fa fa-tag" data-container="body" data-title="Tag" bs-tooltip></i>
      <a ng-href="{{ getUrl(ref, tagTemplate, 'tag') }}" target="_blank">{{ getTitle(ref) }}</a>
    </span>
  </span>
</span>