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'
}
PropertyTypeDescription
pathstringRequired. Server path to load the JSON with the server-drive screen.
fallbackBeagleComponentComponent to be rendered in case the request fails.
methodHttp methodHttp method to make a request.
headersMap<key, value>Header list to attach when you make a request.
shouldShowLoadingbooleanShow or not the loading component.
shouldShowErrorbooleanShow or not the error component.
strategystring<Cache strategy>Cache strategy used in the request.
loadingComponentstringCustomized component for loading.
errorComponentstringCustomized component for error.

Last modified February 11, 2021: create content (#298) (43225e15)