提交 55f3a13f 编写于 作者: W wusongqing

update docs against 6610

Signed-off-by: Nwusongqing <wusongqing@huawei.com>
上级 84c47a10
...@@ -78,29 +78,29 @@ To create Page abilities for an application in the stage model, you must impleme ...@@ -78,29 +78,29 @@ To create Page abilities for an application in the stage model, you must impleme
onCreate(want, launchParam) { onCreate(want, launchParam) {
console.log("MainAbility onCreate") console.log("MainAbility onCreate")
} }
onDestroy() { onDestroy() {
console.log("MainAbility onDestroy") console.log("MainAbility onDestroy")
} }
onWindowStageCreate(windowStage) { onWindowStageCreate(windowStage) {
console.log("MainAbility onWindowStageCreate") console.log("MainAbility onWindowStageCreate")
windowStage.loadContent("pages/index").then((data) => { windowStage.loadContent("pages/index").then((data) => {
console.log("MainAbility load content succeed with data: " + JSON.stringify(data)) console.log("MainAbility load content succeed with data: " + JSON.stringify(data))
}).catch((error) => { }).catch((error) => {
console.error("MainAbility load content failed with error: " + JSON.stringify(error)) console.error("MainAbility load content failed with error: " + JSON.stringify(error))
}) })
} }
onWindowStageDestroy() { onWindowStageDestroy() {
console.log("MainAbility onWindowStageDestroy") console.log("MainAbility onWindowStageDestroy")
} }
onForeground() { onForeground() {
console.log("MainAbility onForeground") console.log("MainAbility onForeground")
} }
onBackground() { onBackground() {
console.log("MainAbility onBackground") console.log("MainAbility onBackground")
} }
...@@ -300,7 +300,7 @@ export default class MainAbility extends Ability { ...@@ -300,7 +300,7 @@ export default class MainAbility extends Ability {
Obtain the `want` parameter that contains the page information from the custom component and process the route based on the URI. Obtain the `want` parameter that contains the page information from the custom component and process the route based on the URI.
```ts ```ts
import router from '@system.router' import router from '@ohos.router'
@Entry @Entry
@Component @Component
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册