⚠️ You are viewing documentation for version: v1.7
Beagle v1.7 is no longer actively maintained. The documented version you are viewing may contain deprecated functionality. For up-to-date documentation, see the latest version .
Remote view parameters
Beagle Remote View
Beagle’s library offers a component to help render the server-driven screens, remote view:
<beagle-remote-view [loadParams]="loadParams"></beagle-remote-view>
<BeagleRemoteView {...loadParams} />
Angular and React accept remote view properties that are called Load Params. It is through it that some options are configured to influence the way the screens are rendered.
See below the properties accepted by it:
import { LoadParams } from '@zup-it/beagle-web';
const params: LoadParams = {
path: '/payload.json',
fallback: {_beagleComponent_: 'beagle:text', text:'Fallback Error'},
method: 'get',
headers: {'header': 'value'},
shouldShowLoading: true,
shouldShowError: true,
strategy: "network-only",
loadingComponent: 'myComponentLoading',
errorComponent: 'myComponentError'
}
Property | Type | Description |
---|---|---|
path | string | Required. Server path to load the JSON with the server-drive screen. |
fallback | BeagleComponent | Component to be rendered in case the request fails. |
method | Http method | Http method to make a request. |
headers | Map<key, value> | Header list to attach when you make a request. |
shouldShowLoading | boolean | Show or not the loading component. |
shouldShowError | boolean | Show or not the error component. |
strategy | string<Cache strategy> | Cache strategy used in the request. |
loadingComponent | string | Customized component for loading. |
errorComponent | string | Customized component for error. |
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.
Last modified February 11, 2021: create content (#298) (43225e15)