src/lib/configuration/sz-configuration/sz-configuration.component.ts
Provides a service integration web component(WC) that can be used to set, read, change, and API configuration parameters used through all components.
For Angular implementations we recommend using SzConfigurationService as an injectable as it provides the more robust solution.
Example :<!-- (WC) SzConfigurationComponent Example - javascript -->
<sz-wc-configuration id="sz-api-conf"></sz-wc-configuration>
document.getElementById('sz-api-conf').basePath = 'http://apis.mydomain.com';
<!-- (WC) SzConfigurationComponent Example - By attribute -->
<sz-wc-configuration base-path="http://apis.mydomain.com/api"></sz-wc-configuration>
selector | sz-configuration |
Inputs |
Outputs |
Accessors |
constructor(apiConfigService: SzConfigurationService)
|
||||||
Parameters :
|
accessToken |
Type : string |
|
apiKeys |
Type : literal type
|
apiKeys to use when connnecting to Api Server |
basePath |
Type : string
|
prefix all api requests with this value. most commonly a http or https protocol://hostname:port string that your api server can be accessed through |
password |
Type : string
|
password used for challenge respose. |
username |
Type : string
|
Username to use when using challenge response authentication. |
withCredentials |
Type : boolean
|
whether or not to use CORs for api requests |
parametersChanged |
Type : Subject<SzRestConfiguration>
|
emmitted when a property has been changed. used mostly for diagnostics. |
apiKeys | ||||||
setapiKeys(value: literal type)
|
||||||
apiKeys to use when connnecting to Api Server
Parameters :
Returns :
void
|
username | ||||||
setusername(value: string)
|
||||||
Username to use when using challenge response authentication.
Parameters :
Returns :
void
|
password | ||||||
setpassword(value: string)
|
||||||
password used for challenge respose.
Parameters :
Returns :
void
|
accessToken | ||||||
setaccessToken(value: string | )
|
||||||
Parameters :
Returns :
void
|
basePath | ||||||
setbasePath(value: string)
|
||||||
prefix all api requests with this value. most commonly a http or https protocol://hostname:port string that your api server can be accessed through
Parameters :
Returns :
void
|
withCredentials | ||||||
setwithCredentials(value: boolean)
|
||||||
whether or not to use CORs for api requests
Parameters :
Returns :
void
|
additionalHeaders | ||||||
setadditionalHeaders(value: literal type | string)
|
||||||
set additional http/https request headers to be added by default to all outbound api server requests. most commonly used for adding custom or required non-standard headers like jwt session tokens, auth id etc.
Parameters :
Returns :
void
|