README.md
1# Page Routing
2
3### Introduction
4
5This sample shows how to use the **router** API to implement page redirection and pass parameters during page redirection.
6
7### Usage
8
9Click the text link on the page. The specified page is displayed.
10
11### Constraints
12
13The **router** API can be invoked only after page rendering is complete. Do not call the API in **onInit** and **onReady** when the page is still in the rendering phase.
14
15This sample can only be run on standard-system devices.
16
README_zh.md
1# 页面路由
2
3### 简介
4
5本示例使用router接口来实现页面跳转能力,以及页面跳转过程中参数的传递。实现效果如下:
6
7
8
9### 相关概念
10
11router:页面路由,提供页面跳转、页面替换、页面传值等能力。
12
13### 相关权限
14
15不涉及。
16
17### 使用说明
18
19点击页面文本内容,页面跳转到指定的页面。
20
21### 约束与限制
22
23注意:页面路由需要在页面渲染完成之后才能调用,在onInit和onReady生命周期中页面还处于渲染阶段,禁止调用页面路由方法。
24
251.本示例仅支持在标准系统上运行。
26
272.本示例需要使用DevEco Studio 3.0 Beta4 (Build Version: 3.0.0.992, built on July 14, 2022)才可编译运行。