Show TOC

Create an index.html FileLocate this document in the navigation structure

A minimalistic index.html file is needed to test the project configuration. This file contains the SAPUI5 bootstrap and a sap.m.Text control that displays the text "SAPUI5 is loaded successfully!".

  1. Choose the New Folder icon in the header toolbar and enter src as the folder name.
  2. Select the newly created folder and create a new index.html file inside it by choosing the New File icon.
  3. Paste the following code in the newly created index.html file and select Save:
    <!DOCTYPE html>
    <html>
    	<head>
    		<meta http-equiv="X-UA-Compatible" content="IE=edge">
    		<meta charset="utf-8">
    		<title>SAPUI5 Walkthrough</title>
    		<script
    			id="sap-ui-bootstrap"
    			src="/resources/sap-ui-core.js"
    			data-sap-ui-theme="sap_bluecrystal"
    			data-sap-ui-modules="sap.m.library"
    			data-sap-ui-compatVersion="edge"
    			data-sap-ui-preload="async" >
    		</script>
    		<script>
    			sap.ui.getCore().attachInit(function () {
    				new sap.m.Text({
    					text : "SAPUI5 is loaded successfully!"
    				}).placeAt("content");
    			});
    		</script>
    	</head>
    	<body class="sapUiBody" id="content">
    	</body>
    </html>
    Caution

    Adapt the path where the resources are located (src="/resources/sap-ui-core.js") according to your installation. For OpenUI5 you can use src="https://openui5.hana.ondemand.com/resources/sap-ui-core.js". For accessing SAPUI5 on the SAP HANA Cloud Platform, for example, use src="https://sapui5.hana.ondemand.com/resources/sap-ui-core.js".

    You can use this reference to the latest stable version of SAPUI5 for the tutorial or for testing purposes, but never use this for productive use. In an actual app, you always have to specify an SAPUI5 version explicitly.

    For more information, see Variant for Bootstrapping from Content Delivery Network.