<!DOCTYPE html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<meta charset="UTF-8">
<title>SAPUI5 HelloWorld</title>
<script
id="sap-ui-bootstrap"
src='https://sapui5.hana.ondemand.com/resources/sap-ui-core.js'
data-sap-ui-theme="sap_belize"
data-sap-ui-libs="sap.m"
data-sap-ui-resourceroots='{
"saphanatutorial": "./"
}'>
</script>
<script>
sap.ui.getCore().attachInit(function () {
var oView = sap.ui.view({
viewName: "saphanatutorial.view.HelloWorld",
type:sap.ui.core.mvc.ViewType.HTML,
});
oView.placeAt("content");
});
</script>
</head>
<body class="sapUiBody" id="content">
</body>
</html>
<template data-controller-name="saphanatutorial.controller.HelloWorld">
<div
data-sap-ui-type="sap.m.Button"
data-text="Say Hello with HTML View"
data-press="onPress">
</div>
</template>
sap.ui.define([
"sap/ui/core/mvc/Controller"
], function(Controller) {
"use strict";
return Controller.extend("saphanatutorial.controller.HelloWorld", {
onPress: function(Event) {
alert("Hello! Button clicked in HTML View");
}
});
});