You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
angular-contenteditable/examples/typeahead2.html

31 lines
1.1 KiB
HTML

<!DOCTYPE html>
<html lang="en" ng-app="typeahead">
<head>
<meta charset="utf-8">
<link href="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.1/css/bootstrap-combined.min.css" rel="stylesheet">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.2/jquery.min.js"></script>
<script src="../components/angular/angular.js"></script>
<script src="../components/angular-bootstrap/ui-bootstrap.js"></script>
<script src="../components/angular-bootstrap/ui-bootstrap-tpls.js"></script>
<script src="../dist/radians.js"></script>
<script>
angular.module('typeahead', ['ui.bootstrap', 'radians'])
.controller('TypeaheadCtrl', function ($scope) {
$scope.selected = undefined
$scope.states =
[ 'Russia <img src="img/ru.gif">'
, 'USA <img src="img/us.gif">'
, 'UK <img src="img/gb.gif">'
]
})
</script>
</head>
<body>
<div class='container-fluid' ng-controller="TypeaheadCtrl">
<pre>Model: {{ selected | json }}</pre>
<div ng-model="selected" typeahead="state for state in states | ignoreImg:$viewValue" contenteditable>
</div>
</div>
</body>
</html>