提交 b2cb21af 编写于 作者: B bojiang

jiangbo91@huawei.com

Signed-off-by: Nbojiang <jiangbo91@huawei.com>
Change-Id: I1eab2cc28c6c9060106abfd03cd4494b4b2f3ea9
上级 94cfda62
...@@ -278,6 +278,8 @@ clear(): boolean ...@@ -278,6 +278,8 @@ clear(): boolean
### 示例1(在一个Ability创建的LocalStorage) ### 示例1(在一个Ability创建的LocalStorage)
> 说明:loadContent中的参数说明请查阅[@loadContent](../reference/apis/js-apis-window.md)。
```ts ```ts
import Ability from '@ohos.application.Ability' import Ability from '@ohos.application.Ability'
export default class MainAbility extends Ability { export default class MainAbility extends Ability {
...@@ -291,6 +293,7 @@ export default class MainAbility extends Ability { ...@@ -291,6 +293,7 @@ export default class MainAbility extends Ability {
console.log("[Demo MainAbility onDestroy]") console.log("[Demo MainAbility onDestroy]")
} }
onWindowStageCreate(windowStage) { onWindowStageCreate(windowStage) {
//storage作为参数传递给loadContent接口,loadContent接口说明请查阅相关文档.
windowStage.loadContent("pages/index",this.storage) windowStage.loadContent("pages/index",this.storage)
} }
onWindowStageDestroy() { onWindowStageDestroy() {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册