forked from DevExpress/obsolete-devextreme-examples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
53 lines (46 loc) · 1.43 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
<!DOCTYPE html>
<html>
<head>
<title>DevExtreme with RequireJS and AngularJS example</title>
<link rel="stylesheet" type="text/css" href="devextreme_amd/dist/css/dx.common.css" />
<link rel="stylesheet" type="text/css" href="devextreme_amd/dist/css/dx.light.css" />
<script src="node_modules/requirejs/require.js"></script>
</head>
<body>
<div ng-controller="myController">
<div style="position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%)">
<div dx-button="buttonOptions"></div>
</div>
</div>
<script>
require.config({
paths: {
"jquery": "node_modules/jquery/dist/jquery",
"angular": "node_modules/angular/angular",
"devextreme": "devextreme_amd"
},
shim: {
"angular": {
deps: ["jquery"],
exports: 'angular'
},
"devextreme/integration/angular": {
deps: ['angular']
}
}
});
require(["angular", "devextreme/ui/dialog", "devextreme/integration/angular", "devextreme/ui/button"], function(angular, dialog) {
var myApp = angular.module('myApp', ['dx']);
myApp.controller("myController", function($scope) {
$scope.buttonOptions = {
text: "Say 'Hello world'",
onClick: function() {
dialog.alert('Hello world!', '', false);
}
};
});
angular.bootstrap(document, ['myApp']);
});
</script>
</body>
</html>