Skip to content
This repository has been archived by the owner on May 29, 2019. It is now read-only.

feat(typeahead): Add title to matches #5252

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion template/typeahead/typeahead-match.html
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
<a href tabindex="-1" ng-bind-html="match.label | uibTypeaheadHighlight:query"></a>
<a href
tabindex="-1"
ng-bind-html="match.label | uibTypeaheadHighlight:query"
ng-attr-title="{{match.label}}"></a>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason for ng-attr here instead of just title="{{...}}"?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These guys explain it pretty well.

It is basically so you never see the text {{match.label}} in the tooltip. This will only add the title attribute with the actual value of match.label.