未验证 提交 d8f0f1a6 编写于 作者: O openharmony_ci 提交者: Gitee

!22211 FA模型和stage模型跳转示例代码错误修改,abilityName说明新增

Merge pull request !22211 from chenyuyan/master0810
......@@ -8,6 +8,9 @@
UIAbility启动PageAbility和UIAbility启动UIAbility的方式完全相同。
> **说明:**
> 需注意FA模型中abilityName由bundleName + AbilityName组成,具体见示例。
```ts
import UIAbility from '@ohos.app.ability.UIAbility';
......@@ -25,7 +28,7 @@ export default class EntryAbility extends UIAbility {
});
let want = {
bundleName: "com.ohos.fa",
abilityName: "EntryAbility",
abilityName: "com.ohos.fa.EntryAbility",
};
this.context.startAbility(want).then(() => {
console.info('Start Ability successfully.');
......
......@@ -14,7 +14,7 @@ import featureAbility from '@ohos.ability.featureAbility';
let parameter = {
"want": {
bundleName: "com.ohos.stage",
abilityName: "com.ohos.stage.EntryAbility"
abilityName: "EntryAbility"
}
};
featureAbility.startAbility(parameter).then((code) => {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册