samples/2021/12/dojo_demo1/index.html

45 lines
931 B
HTML
Raw Normal View History

<!DOCTYPE html>
<html>
<head>
<title>Dojo App</title>
<meta charset="utf-8" />
<!--dojoConfig-->
<script>
var dojoConfig = {
parseOnLoad: false,
async: true,
cacheBust: true, // Get "fresh" resources,
baseUrl: "/app",
packages: [
{name: "dojo", location: "/node_modules/dojo"}
2021-12-19 13:38:58 +00:00
{name: "dojox", location: "/node_modules/dojox"},
{name: "dijit", location: "/node_modules/dijit"},
]
};
</script>
<!--load dojo toolkit-->
<script src="/node_modules/dojo/dojo.js"></script>
<script>
require([
"dojo/dom",
"app/widgets/MainWidget.js",
"dojo/domReady!"
], function (dom, MainWidget) {
var greeting = dom.byId('root');
var widget = new MainWidget();
widget.placeAt(greeting);
widget.startup();
});
</script>
</head>
<body>
<div id="root"></div>
</body>
</html>