1# StartAbilityParameter 2 3The **StartAbilityParameter** module defines the parameters for starting an ability. The parameters can be used as input parameters in [startAbility](js-apis-ability-featureAbility.md#featureabilitystartability) to start the specified ability. 4 5> **NOTE** 6> 7> The initial APIs of this module are supported since API version 6. Newly added APIs will be marked with a superscript to indicate their earliest API version. 8> The APIs of this module can be used only in the FA model. 9 10## Modules to Import 11 12```ts 13import ability from '@ohos.ability.ability'; 14``` 15 16## Attributes 17 18**System capability**: SystemCapability.Ability.AbilityRuntime.FAModel 19 20| Name | Type | Mandatory | Description | 21| ------------------- | -------- | ---- | -------------------------------------- | 22| want | [Want](js-apis-application-want.md)| Yes | Want information about the target ability. | 23| abilityStartSetting | {[key: string]: any} | No | Special attribute of the target ability. This attribute can be passed in the call.| 24 25**Example** 26```ts 27import ability from '@ohos.ability.ability'; 28import featureAbility from '@ohos.ability.featureAbility'; 29import Want from '@ohos.app.ability.Want'; 30 31let want: Want = { 32 bundleName: 'com.example.abilityStartSettingApp2', 33 abilityName: 'com.example.abilityStartSettingApp.EntryAbility', 34}; 35 36let startAbilityParameter: ability.StartAbilityParameter = { 37 want : want, 38 abilityStartSetting : { 39 abilityBounds : [100,200,300,400], 40 windowMode : 41 featureAbility.AbilityWindowConfiguration.WINDOW_MODE_UNDEFINED, 42 displayId : 1, 43 } 44}; 45 46try { 47 featureAbility.startAbility(startAbilityParameter, (error, data) => { 48 if (error && error.code !== 0) { 49 console.error(`startAbility fail, error: ${JSON.stringify(error)}`); 50 } else { 51 console.log(`startAbility success, data: ${JSON.stringify(data)}`); 52 } 53 }); 54} catch(error) { 55 console.error(`startAbility error: ${JSON.stringify(error)}`); 56} 57``` 58