1e41f4b71Sopenharmony_ci# StartAbilityParameter 2e41f4b71Sopenharmony_ci 3e41f4b71Sopenharmony_ciThe **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. 4e41f4b71Sopenharmony_ci 5e41f4b71Sopenharmony_ci> **NOTE** 6e41f4b71Sopenharmony_ci> 7e41f4b71Sopenharmony_ci> 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. 8e41f4b71Sopenharmony_ci> The APIs of this module can be used only in the FA model. 9e41f4b71Sopenharmony_ci 10e41f4b71Sopenharmony_ci## Modules to Import 11e41f4b71Sopenharmony_ci 12e41f4b71Sopenharmony_ci```ts 13e41f4b71Sopenharmony_ciimport ability from '@ohos.ability.ability'; 14e41f4b71Sopenharmony_ci``` 15e41f4b71Sopenharmony_ci 16e41f4b71Sopenharmony_ci## Attributes 17e41f4b71Sopenharmony_ci 18e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Ability.AbilityRuntime.FAModel 19e41f4b71Sopenharmony_ci 20e41f4b71Sopenharmony_ci| Name | Type | Mandatory | Description | 21e41f4b71Sopenharmony_ci| ------------------- | -------- | ---- | -------------------------------------- | 22e41f4b71Sopenharmony_ci| want | [Want](js-apis-app-ability-want.md)| Yes | Want information about the target ability. | 23e41f4b71Sopenharmony_ci| abilityStartSetting | { [key: string]: any } | No | Special attribute of the target ability. This attribute can be passed in the call. | 24e41f4b71Sopenharmony_ci| abilityStartSettings<sup>11+<sup> | Record\<string, Object> | No | Special attribute of the target ability. This attribute can be passed in the call. You are advised to use this attribute to replace **abilityStartSetting**. When this attribute is set, **abilityStartSetting** does not take effect. | 25e41f4b71Sopenharmony_ci 26e41f4b71Sopenharmony_ci**Example** 27e41f4b71Sopenharmony_ci 28e41f4b71Sopenharmony_ci<!--code_no_check_fa--> 29e41f4b71Sopenharmony_ci```ts 30e41f4b71Sopenharmony_ciimport ability from '@ohos.ability.ability'; 31e41f4b71Sopenharmony_ciimport featureAbility from '@ohos.ability.featureAbility'; 32e41f4b71Sopenharmony_ciimport Want from '@ohos.app.ability.Want'; 33e41f4b71Sopenharmony_ci 34e41f4b71Sopenharmony_cilet want: Want = { 35e41f4b71Sopenharmony_ci bundleName: 'com.example.abilityStartSettingApp2', 36e41f4b71Sopenharmony_ci abilityName: 'com.example.abilityStartSettingApp.EntryAbility', 37e41f4b71Sopenharmony_ci}; 38e41f4b71Sopenharmony_ci 39e41f4b71Sopenharmony_cilet startAbilityParameter: ability.StartAbilityParameter = { 40e41f4b71Sopenharmony_ci want : want, 41e41f4b71Sopenharmony_ci abilityStartSettings : { 42e41f4b71Sopenharmony_ci abilityBounds : [100,200,300,400], 43e41f4b71Sopenharmony_ci windowMode : 44e41f4b71Sopenharmony_ci featureAbility.AbilityWindowConfiguration.WINDOW_MODE_UNDEFINED, 45e41f4b71Sopenharmony_ci displayId : 1, 46e41f4b71Sopenharmony_ci } 47e41f4b71Sopenharmony_ci}; 48e41f4b71Sopenharmony_ci 49e41f4b71Sopenharmony_citry { 50e41f4b71Sopenharmony_ci featureAbility.startAbility(startAbilityParameter, (error, data) => { 51e41f4b71Sopenharmony_ci if (error && error.code !== 0) { 52e41f4b71Sopenharmony_ci console.error(`startAbility fail, error: ${JSON.stringify(error)}`); 53e41f4b71Sopenharmony_ci } else { 54e41f4b71Sopenharmony_ci console.log(`startAbility success, data: ${JSON.stringify(data)}`); 55e41f4b71Sopenharmony_ci } 56e41f4b71Sopenharmony_ci }); 57e41f4b71Sopenharmony_ci} catch(error) { 58e41f4b71Sopenharmony_ci console.error(`startAbility error: ${JSON.stringify(error)}`); 59e41f4b71Sopenharmony_ci} 60e41f4b71Sopenharmony_ci``` 61