Step 1: Hello World!

介绍

As you know SAPUI5 is all about HTML5. Let’s get started with building a first “Hello World” with only HTML.

1.练习效果

Step 1: Hello World! - 第1张  | 优通SAP

2.源码

You can view and download all files at Walkthrough – Step 1.

webapp/index.html (New)

Create a new folder webapp which will contain all sources of the app we will
create throughout this tutorial. Therefore, we refer to this folder as “app
folder”.

Now create a new root HTML file called index.html in your app folder. An HTML
document consists basically of two sections: head and body. The head part will be
used by the browser to process the document. Using meta tags we can influence the
behavior of the browser.

In this case we will tell the browser to use UTF-8 as the document character set. We will also give our app a title that will
be displayed in the browser. Be aware that our hard-coded title can be overruled by the app, for example to show a title in the
language of the user.

The body part describes the layout of the page. In our case we simply display “Hello World” by
using a p tag.

3.Tip

Typically, the content of the webapp folder is deployed to a Web server as an application package. When deploying the webapp folder itself the URL for accessing the index.html file contains webapp in the path.

4. Conventions

  • Name the root HTML file of the app index.html and locate it in the
    webapp folder.

留下一个回复

你的email不会被公开。

5 − four =