harmony 鸿蒙Adding Pages

  • 2022-08-09
  • 浏览 (775)

Adding Pages

Creating the Home Page

Upon creation of the project, the index page is automatically generated, which is the home page of AirQuality. Figure 1 shows the project directory.

Figure 1 Project directory

Creating the Details Page

To the details page, perform the following steps:

  1. Right-click pages and choose New > JS Page from the shortcut menu.

    Figure 2 Adding a page

  2. Enter the page name.

    Figure 3 Entering the page name

  3. Confirm the creation.

    The following figure shows the application project directory after the detail page is created. It contains a .hml layout file, a .css file, and a .js file (containing service logic code).

    Figure 4 Complete project directory

你可能感兴趣的鸿蒙文章

harmony 鸿蒙Development Examples

harmony 鸿蒙Photographing

harmony 鸿蒙Previewing

harmony 鸿蒙Video Recording

harmony 鸿蒙Use Case

harmony 鸿蒙Screen and Camera Control Overview

harmony 鸿蒙Debugging and Packaging

harmony 鸿蒙Building the Details Page

harmony 鸿蒙FAQs

harmony 鸿蒙Building the Home Page

0  赞