md-autocomplete, ui-sref on searched item
Hello everyone.
I use md-autocomplete
And I need to add ui-sref( or ng-click) for searched list items.
This is example of my HTML, where I added ui-sref to span, but it's not working properly, because it fires only if I click on the text of span:
<md-autocomplete placeholder="{{:: 'SEARCH_INPUT' | translate}}"
md-selected-item="selectedItem"
md-search-text="searchString"
md-items="item in getMatches()"
md-item-text="item.display"
md-delay="500">
<span md-highlight-text="searchString"
ui-sref="item.details({itemCode: selectedItem.code">
{{item.display}}
</span>
</md-autocomplete>
But how I need to add an ui-sref, that it should fire when I click on whole line?

Thanks!
@lillylykho I think what you're asking for is a different component entirely. An autocomplete form input and dropdown menu full of links are two different patterns. @robertmesserle @rschmukler I think we talked about adding autocomplete support to mdSelect a bit yesterday, or what the difference between mdAutocomplete and mdSelect should be. This should be part of that conversation.
Regardless, a select/dropdown full of links instead of options will require different semantics for accessibility. Basically, a dropdown can either act like a forum input, or a list of links, but not both at the same time.
@lillylykho Is there any reason that you wouldn't do this through md-selected-item-change? I don't think that we would want to support ui-sref in the autocomplete dropdown; however, it could be valid to perform some operation when an item is selected (ie. clicked on)
@robertmesserle Thanks!
And yeah, I have already used. It work perfect!
But I should be able to have the option "Open link in new tab" by right-clicking on item. Maybe you can help me with ideas?
Thanks
@lillylykho can you share how you managed to do this ? i am very new to Mean Stack and i tried a similar approach, but no luck ! Only the item.name is a link. Here is what I am trying to do.
<md-item-template>
<a md-highlight-text="ctrl.searchText" ui-sref="topics.view({topicId: item._id})">{{item.name}}</a>
</md-item-template>
Thanks