0
私はES6とAngularのフロントエンドアプリケーションを開発中です。私はオートコンプリートで検索ボックスを作成しようとしており、Angucomplete-altを使ってオプションリストのカスタムテンプレートを使いたいと思っています。Angucomplete-altでカスタムテンプレートを使用するには?
テンプレートを作成しましたが、オプションは引き続き標準形式であり、実行によってエラーが発生することはありません。 examples pageにはサンプルテンプレートがありません。
テンプレートを作成する方法の例を教えてもらえますか?
マイサーチ:
<angucomplete-alt id="country-search"
placeholder="Search countries"
pause="100"
selected-object="selectedCountry"
local-data="getCountries()"
search-fields="name"
title-field="name"
minlength="1"
template-url="/country-list-item.html"
input-class="form-control form-control-small"></angucomplete-alt>
テンプレート:
<div class="autocomplete-template">
<div class="left-panel" style="display: inline-block;">
<span class="flag-icon flag-icon-{{ ::data.isoCode | lowercase}}"></span>
</div>
<div class="right-panel" style="display: inline-block;">
<span ng-bind-html="$highlight($getDisplayText())"></span>
</div>
</div>
すべての提案を歓迎いたします。
ありがとうございます。
事は注意する:テンプレートは 'NG-focus'属性が重複しています。 – atoth