-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
56 lines (49 loc) · 1.74 KB
/
index.html
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<!DOCTYPE html>
<html ng-app="testdirective">
<head>
<link rel="stylesheet" href="style.css">
<script src="/googleapis/ajax/libs/angularjs/1.2.10/angular.js"></script>
<script src="/googleapis/ajax/libs/angularjs/1.2.10/angular-resource.js"></script>
<script src="/googleapis/ajax/libs/angularjs/1.2.10/angular-sanitize.js"></script>
<script src="/googleapis/ajax/libs/angularjs/1.2.10/angular-mocks.js"></script>
<script src="ui-keypress.js"></script>
<script src="script.js"></script>
</head>
<body ng-controller="food">
<input type="text" tabindex="0">
<br />dropdown static {{foo}}<br />
<dropdown name="foo" ng-model="foo">
<ddli value="1">
<span class='bla'>abc</span>
<span class='bli'>def</span>
</ddli>
<ddli value="2">xyz</ddli>
<ddli value="3">foo</ddli>
<ddli value="4">bar</ddli>
</dropdown>
<br />
<br />dropdown static with default attr without value {{fu}}<br />
<dropdown name="lalere" ng-model="lalere">
<ddli value="1"><span class='bla'>hu</span><span class='bli'>da</span></ddli>
<ddli value="2">ding</ddli>
<ddli value="3" default>dong</ddli>
<ddli value="4">lala</ddli>
</dropdown>
<br />
<!---->
with ng-repeat with attribute "default" {{foobar}} model not defined
<br />
<dropdown name="foobar" ng-model="foobar">
<ddli value="{{vegie.id}}" ng-repeat="(i, vegie) in vegies" default="{{vegie.name === 'carots'}}">
{{vegie.name}}
</ddli>
</dropdown>
<br />
with ng-repeat. No default, no model defined {{foobarbaz}}. Default should be the first item.
<br />
<dropdown name="foobarbaz" ng-model="foobarbaz">
<ddli value="{{fish.id}}" ng-repeat="fish in fishes">{{fish.name}}</ddli>
</dropdown>
<br /><br /><br /><br /><br /><br />
</body>
</html>