<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Demo</title>
<script id="sap-ui-bootstrap"
src="https://sdk.openui5.org/resources/sap-ui-core.js"
data-sap-ui-async="true"
data-sap-ui-onInit="module:sap/ui/core/ComponentSupport"
data-sap-ui-compatVersion="edge"
data-sap-ui-resourceRoots='{"demo": "./"}'
data-sap-ui-excludeJQueryCompat="true"
data-sap-ui-xx-waitForTheme="init"
></script>
</head>
<body id="content" class="sapUiBody">
<div data-sap-ui-component
data-id="rootComponentContainer"
data-settings='{"id": "rootComponent"}'
data-name="demo"
data-height="100%"
class="myRootComponentContainer"
></div>
</body>
</html>
sap.ui.define([
"sap/ui/core/UIComponent",
"sap/ui/core/ComponentSupport",//https://github.com/SAP/ui5-tooling/issues/381
], (UIComponent) => {
"use strict";
return UIComponent.extend("demo.Component", {
metadata: {
interfaces: [
"sap.ui.core.IAsyncContentCreation",
],
manifest: "json",
},
init() {
UIComponent.prototype.init.apply(this, arguments);
this.getRouter().initialize();
},
});
});
{
"_version": "1.46.0",
"start_url": "index.html",
"sap.app": {
"id": "demo",
"type": "application",
"title": "foo",
"description": "bar",
"applicationVersion": {
"version": "1.0.0"
}
},
"sap.ui": {
"technology": "UI5",
"deviceTypes": {
"desktop": true,
"tablet": true,
"phone": true
}
},
"sap.ui5": {
"dependencies": {
"minUI5Version": "1.98.0",
"libs": {
"sap.ui.core": {},
"sap.m": {},
"sap.f": {},
"sap.ui.layout": {},
"sap.ui.unified": {}
}
},
"contentDensities": {
"compact": true,
"cozy": true
},
"models": {},
"resources": {
"css": [
{
"uri": "ui5://demo/css/style.css"
}
]
},
"rootView": {
"viewName": "demo.view.Root",
"id": "rootView",
"type": "XML",
"async": true
},
"routing": {
"routes": [
{
"name": "home",
"pattern": "",
"target": [
"home"
],
"layout": "OneColumn"
}
],
"targets": {
"home": {
"id": "homeView",
"name": "Home",
"controlAggregation": "beginColumnPages",
"level": 1
},
"notFound": {
"name": "Home",
"controlAggregation": "beginColumnPages",
"transition": "fade",
"level": 98
}
},
"config": {
"async": true,
"routerClass": "sap.f.routing.Router",
"type": "View",
"viewType": "XML",
"path": "demo.view",
"controlId": "fcl",
"transition": "slide",
"bypassed": {
"target": "notFound"
},
"homeRoute": "home"
}
}
}
}
<mvc:View controllerName="demo.controller.Root"
xmlns:mvc="sap.ui.core.mvc"
xmlns:f="sap.f"
xmlns="sap.m"
height="100%"
displayBlock="true"
>
<App autoFocus="false">
<f:FlexibleColumnLayout id="fcl">
<f:beginColumnPages>
<!-- Added by router -->
</f:beginColumnPages>
<f:midColumnPages>
<!-- Added by router -->
</f:midColumnPages>
<f:endColumnPages>
<!-- Added by router -->
</f:endColumnPages>
</f:FlexibleColumnLayout>
</App>
</mvc:View>
<mvc:View controllerName="demo.controller.Home"
xmlns:mvc="sap.ui.core.mvc"
xmlns:f="sap.f"
xmlns="sap.m"
height="100%"
>
<f:DynamicPage class="sapUiResponsiveContentPadding">
<f:title>
<!-- ... -->
</f:title>
<f:content>
<Text text="Content.. 🌵" />
</f:content>
</f:DynamicPage>
</mvc:View>
sap.ui.define([
"sap/ui/core/mvc/Controller",
], (Controller) => {
"use strict";
return Controller.extend("demo.controller.Root", {
onInit() {
// ...
},
});
});
sap.ui.define([
"sap/ui/core/mvc/Controller",
], (Controller) => {
"use strict";
return Controller.extend("demo.controller.Home", {
onInit() {
// ...
},
});
});
html, body, .myRootComponentContainer {
height: 100%;
margin: 0;
}