blob: 392abf81a87b42655a956e1075791e9088e8cd84 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
<!DOCTYPE HTML>
<html xmlns:ng="http://angularjs.org">
<head>
<script type="text/javascript" src="../lib/jquery/jquery-1.4.2.js"></script>
<script type="text/javascript" src="../src/angular-bootstrap.js" ng:autobind></script>
<head>
<body>
<select name='selection0' style="display:block;">
<option ng:repeat='value in ["FOO","BAR"]'">{{value}}</option>
</select>
{{selection0}} <-- FOO should be shown here
<hr/>
<select ng:init="selection1='ignore'" name='selection1' style="display:block;">
<option ng:repeat='value in ["FOO","BAR"]' ng:bind-attr="{selected:'{{value==\'BAR\'}}'}">{{value}}</option>
</select>
{{selection1}} <-- BAR should be shown here
<hr/>
<select ng:init="selection2=1" name="selection2" style="display:block;">
<option value="{{$index}}" ng:repeat="opt in ['zero', 'one']">{{opt}}</option>
</select>
{{selection2}} <-- 1 should be shown here
</body>
</html>
|