From d91f30b2c6c7039e0561685fe52ec857931cfdd9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=91=9B=E4=BA=9A=E8=8A=B3?= Date: Wed, 8 Jun 2022 11:38:40 +0000 Subject: [PATCH] fixed 5839453 from https://gitee.com/ge-yafang/docs/pulls/5155 update en/application-dev/quick-start/start-with-ets.md. Signed-off-by: @ge-yafang --- en/application-dev/quick-start/start-with-ets.md | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/en/application-dev/quick-start/start-with-ets.md b/en/application-dev/quick-start/start-with-ets.md index 53c1133bfb..293956a064 100644 --- a/en/application-dev/quick-start/start-with-ets.md +++ b/en/application-dev/quick-start/start-with-ets.md @@ -40,7 +40,8 @@ After the project synchronization is complete, choose **entry** > **src** > **main** > **ets** > **MainAbility** > **pages** in the **Project** window and open the **index.ets** file. You can see that the file contains a **<Text>** component. The sample code in the **index.ets** file is shown below: - ``` + ```ts + // index.ets @Entry @Component struct Index { @@ -65,7 +66,8 @@ On the default page, add a **<Button>** component to accept user clicks and implement redirection to another page. The sample code in the **index.ets** file is shown below: - ``` + ```ts + // index.ets @Entry @Component struct Index { @@ -118,7 +120,8 @@ Add **<Text>** and **<Button>** components and set their styles, as you do for the first page. The sample code in the **second.ets** file is shown below: - ``` + ```ts + // second.ets @Entry @Component struct Second { @@ -160,7 +163,8 @@ You can implement page redirection through the page router, which finds the targ In the **index.ets** file of the first page, bind the **onClick** event to the **Next** button so that clicking the button redirects the user to the second page. The sample code in the **index.ets** file is shown below: - ``` + ```ts + // index.ets import router from '@ohos.router'; @Entry @@ -204,7 +208,8 @@ You can implement page redirection through the page router, which finds the targ In the **second.ets** file of the second page, bind the **onClick** event to the **Back** button so that clicking the button redirects the user back to the first page. The sample code in the **second.ets** file is shown below: - ``` + ```ts + // second.ets import router from '@ohos.router'; @Entry -- GitLab