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

docs(typeahead): Show custom template implementation #1441

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
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
7 changes: 6 additions & 1 deletion src/typeahead/docs/demo.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
<script type="text/ng-template" id="customTemplate.html">
<a><img ng-src="{{match.model.flag}}" width="16"> {{match.model.name}}</a>
</script>
<div class='container-fluid' ng-controller="TypeaheadCtrl">
<pre>Model: {{selected| json}}</pre>
<input type="text" ng-model="selected" typeahead="state for state in states | filter:$viewValue | limitTo:8">
</div>
<pre>Model: {{customSelected| json}}</pre>
<input type="text" ng-model="customSelected" placeholder="Custom template" typeahead="state as state.name for state in iconedStates | filter:{name:$viewValue}" typeahead-template-url="customTemplate.html">
</div>
1 change: 1 addition & 0 deletions src/typeahead/docs/demo.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.