forked from handsontable/ngHandsontable
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ui.html
55 lines (42 loc) · 2.22 KB
/
ui.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
<!doctype html>
<html lang="en" ng-app="uiApp">
<head>
<meta charset="utf-8">
<title>Angular UI Handsontable with Angular UI</title>
<script src="bower_components/jquery/jquery.min.js"></script>
<script src="bower_components/angular/angular.js"></script>
<link rel="stylesheet" href="bower_components/select2/select2.css">
<script type="text/javascript" src="bower_components/select2/select2.js"></script>
<script type="text/javascript" src="bower_components/angular-ui-select2/src/select2.js"></script>
<script src="dist/angular-ui-handsontable.full.js"></script>
<link rel="stylesheet" media="screen" href="dist/angular-ui-handsontable.full.css">
<script src="js/split-screen.js"></script>
<style>
body {
font-family: Arial;
}
</style>
</head>
<body ng-controller="MyCtrl">
<h1>Handsontable with Angular UI</h1>
<p>Angular UI Handsontable <b>can</b> coexist with <a href="http://angular-ui.github.com/">Angular UI</a>, but <b>does not</b> have dependency on it.</p>
<ui-handsontable settings="{minSpareRows: 1, rowHeaders: true}" datarows="item in db.items" height="300" width="600">
<datacolumn value="item.id" title="'ID'"></datacolumn>
<datacolumn type="grayedOut" value="item.name.first" title="'First Name'" readOnly></datacolumn>
<datacolumn type="grayedOut" value="item.name.last" title="'Last Name'" readOnly></datacolumn>
<datacolumn value="item.address" title="'Address'"></datacolumn>
<datacolumn value="item.Product.Description" title="'Favorite food'" type="'autocomplete'">
<optionlist datarows="option in item.Product.Options" clickrow="item.Product.Description = option.Description">
<img ng-src="{{option.Image}}" style="width: 16px; height: 16px; border-width: 0"> {{option.Description}}
</optionlist>
</datacolumn>
</ui-handsontable>
<p>Address of the first person:</p>
<input type="text" ng-model="db.items[0].address" style="width: 300px">
<p>Select favorite food of first person:</p>
<select ui-select2 ng-model="db.items[0].Product.Description" data-placeholder="-- Select One --" style="width: 150px">
<option></option>
<option ng-repeat="option in db.items[0].Product.Options" value="{{option.Description}}">{{option.Description}}</option>
</select>
</body>
</html>