forked from DevExpress/obsolete-devextreme-examples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
39 lines (34 loc) · 1.17 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
<!DOCTYPE html>
<html>
<head>
<title>DevExtreme with RequireJS and Knockout example</title>
<link rel="stylesheet" type="text/css" href="node_modules/devextreme/dist/css/dx.common.css" />
<link rel="stylesheet" type="text/css" href="node_modules/devextreme/dist/css/dx.light.css" />
<script src="node_modules/requirejs/require.js"></script>
</head>
<body>
<div style="position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%)">
<div data-bind="dxButton: buttonOptions"></div>
</div>
<script>
require.config({
paths: {
"jquery": "node_modules/jquery/dist/jquery",
"knockout": "node_modules/knockout/build/output/knockout-latest",
"devextreme": "node_modules/devextreme"
}
});
require(["knockout", "devextreme/ui/dialog", "devextreme/integration/knockout", "devextreme/ui/button"], function(ko, dialog) {
var viewModel = {
buttonOptions: {
text: "Say 'Hello world'",
onClick: function() {
dialog.alert('Hello world!', '', false);
}
}
};
ko.applyBindings(viewModel);
});
</script>
</body>
</html>