-
Notifications
You must be signed in to change notification settings - Fork 5
/
test.html
87 lines (69 loc) · 2.66 KB
/
test.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
<!doctype html>
<html data-ng-app="angular-dojo-test">
<head>
<link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/dojo/1.9.2/dijit/themes/claro/claro.css" />
</head>
<body class="claro" data-ng-controller="TestController">
<div>
<div data-dojo-widget="dijit/Calendar" data-ng-model="date" data-ng-change="log(date)"/>
</div>
Date: {{date}}
<div>
<select
data-dojo-widget="dijit/form/FilteringSelect"
data-dojo-props="name: 'filterSelect', searchAttr: 'search'"
data-ng-model="selection"
data-dojo-store="store" data-ng-change="log(selection)"></select>
Selection: {{selection}}
</div>
<div>
<input data-dojo-widget="dijit/form/Textarea" data-ng-model="mytext" />
{{mytext}}
</div>
<div>
<input data-dojo-widget="dijit/form/DateTextBox" data-ng-model="date2" />
{{date2}}
</div>
<div>
<form id="myform">
<input type="radio" data-dojo-widget="dijit/form/RadioButton" name="drink" id="radioOne" data-ng-model="drink" value="tea"/> <label for="radioOne">Tea</label> <br />
<input type="radio" data-dojo-widget="dijit/form/RadioButton" name="drink" id="radioTwo" data-ng-model="drink" checked value="coffee"/> <label for="radioTwo">Coffee</label> <br />
</form>
{{drink}}
</div>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.13/angular.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/dojo/1.9.2/dojo/dojo.js"></script>
<script src="angular-dojo.js"></script>
<script>
function TestController($scope) {
$scope.selection = 'CA';
$scope.search = "name";
$scope.date = new Date();
require([
"dojo/ready", "dojo/store/Memory", "dijit/form/FilteringSelect"
], function(ready, Memory, FilteringSelect){
$scope.store = new Memory({
data: [
{name:"Alabama", id:"AL"},
{name:"Alaska", id:"AK"},
{name:"American Samoa", id:"AS"},
{name:"Arizona", id:"AZ"},
{name:"Arkansas", id:"AR"},
{name:"Armed Forces Europe", id:"AE"},
{name:"Armed Forces Pacific", id:"AP"},
{name:"Armed Forces the Americas", id:"AA"},
{name:"California", id:"CA"},
{name:"Colorado", id:"CO"},
{name:"Connecticut", id:"CT"},
{name:"Delaware", id:"DE"}
]
});
});
$scope.log = function(msg) {
console.log(msg);
};
};
var module = angular.module("angular-dojo-test", ['angular-dojo']);
</script>
</body>
</html>