harmony(鸿蒙)Directory Structure

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

Directory Structure

The following figure shows the typical directory structure of the ets module (in entry/src/main) for an application with feature abilities (FAs).

en-us_image_0000001222967752

The ets directory contains the following files:

.ets files: Extended TypeScript (eTS) files that describe the UI layouts, styles, event interactions, and page logics.

Functions of the folders and files are as follows:

  • The app.ets file manages global application logics and lifecycles.

  • The pages directory stores all pages.

  • The common directory stores common code files, such as files of custom components and public methods.

NOTE

  • For details about the resources directory in src/main, see Resource File Categories.
  • TypeScript and JavaScript files can be imported as page files.

“js” tag configuration:

Configure the “js” tag in the configuration file of your application. The “js” tag contains the instance name, page route, and window configuration information.

NOTE

For details about the “js” tag in the FA model, see Table 22 Internal structure of the js attribute.

For details about the “js” tag in the stage model, see Table 3 Internal structure of the module tag.

你可能感兴趣的鸿蒙文章

harmony(鸿蒙)UI Development

harmony(鸿蒙)ArkUI Overview

harmony(鸿蒙)File Organization

harmony(鸿蒙)app.js

harmony(鸿蒙)“js” Tag

harmony(鸿蒙)Lifecycle

harmony(鸿蒙)Multi-Language Capability

harmony(鸿蒙)Resource Limitations and Access

harmony(鸿蒙)CSS

harmony(鸿蒙)HML

0  赞