F2 and Dojo
by OpenF2js
HTML
<html>
<head>
<link rel="stylesheet" type="text/css" href="http://docs.openf2.org/css/bootstrap.min.2.1.1.css">
<script src="https://ajax.googleapis.com/ajax/libs/dojo/1.8.3/dojo/dojo.js"></script>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script src="https://raw.github.com/OpenF2/F2/amd-eval/sdk/f2.min.js"></script>
</head>
<body>
<div id="destination">Content, or F2 app, goes here</div>
</body>
</html>
CSS
body { padding: 20px; }
JavaScript
/**
* F2 app integration using Dojo.
* More at http://docs.openf2.org/container-development.html
*/
//define app config
var _appConfigs = [{
appId: "com_openf2_examples_csharp_helloworld",
manifestUrl: "https://developer.openf2.org/Examples/apps",
name: "Hello World"
}];
require(["dojo/ready", "dojo/dom", "dojo/html"], function (ready, dom, dojohtml) {
ready(function () {
//init F2 container
F2.init({
//define ContainerConfig properties
appRender: function (appConfig, html) {
dojohtml.set(dom.byId("destination"), html);
},
beforeAppRender: function (appConfig, html) {
},
afterAppRender: function (appConfig) {
//return dom.byId("destination");
}
});
//load apps
F2.registerApps(_appConfigs);
})
});