提交 15ec1dff 编写于 作者: Z zhangyafei.echo

IssueNo:I5O9P6

Description:Fix a bug in the startability sample code.
Sig:SIG_ApplicationFramework
Feature or BugFix: BugFix
Binary Source: No
Signed-off-by: Nzhangyafei.echo <zhangyafei12@huawei.com>
Change-Id: Ibaa68b1cc74fd4ce73c13fe8e0410add67ed105a
上级 d8d6fa32
......@@ -231,8 +231,8 @@ var want = {
"bundleName": "com.example.MyApplication",
"abilityName": "MainAbility"
};
context.startAbility(want).then((data) => {
console.log("Succeed to start ability with data: " + JSON.stringify(data))
context.startAbility(want).then(() => {
console.log("Succeed to start ability")
}).catch((error) => {
console.error("Failed to start ability with error: "+ JSON.stringify(error))
})
......@@ -248,8 +248,8 @@ var want = {
"bundleName": "com.example.MyApplication",
"abilityName": "MainAbility"
};
context.startAbility(want).then((data) => {
console.log("Succeed to start remote ability with data: " + JSON.stringify(data))
context.startAbility(want).then(() => {
console.log("Succeed to start remote ability")
}).catch((error) => {
console.error("Failed to start remote ability with error: " + JSON.stringify(error))
})
......
......@@ -127,7 +127,7 @@ startAbility(want: Want, options?: StartOptions): Promise&lt;void&gt;;
windowMode: 0,
};
this.context.startAbility(want, options)
.then((data) => {
.then(() => {
console.log('Operation successful.')
}).catch((error) => {
console.log('Operation failed.');
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册