To use the Beagle library, it is necessary to create a Beagle Service setup to know where and how to search for server-driven screens.
On React you can easily create a Beagle Service through the function
createBeagleService(beagleServiceOptions)
On Angular the base code is automatically generated and the properties can be modify and added on beagle.module.ts.
The configuration object has the following properties:
Attribute | Type | Default | Required | Description |
---|---|---|---|---|
baseUrl | string | ✓ | URL to the server with screens (JSON) on Beagle format. | |
components | Map<string,Component> | ✓ | A components map that will be rendered through Beagle’s library. The values are key pairs and value where the key is identifier Beagle will always start by beagle: or custom: . The value will always be the component connected to identifier. | |
fetchData | fetch | It allows to add a customized function t to make HTTP requests. | ||
analyticsProvider | Analytics | It allows the use of handlers to the tag capture of some events. | ||
customActions | Map<string,ActionHandler> | A customized action map that can be interpreted by Beagle’s library. It is a key and value map where the key will always be an identifier starting by beagle: or custom: and the value will be the ActionHandler connected to that action. | ||
customOperations | Record<string, (any[]) => any> | A map of additional operation to be used by Beagle expressions. | ||
lifecycles | LifeCycleHook | A global map to add lifecycles behaviors of the components. Each cycle happens on the screen renderization process, before the components become HTML. | ||
defaultNavigationController | NavigationController | The default NavigationController | NavigationController to use as the default value for navigations. | |
navigationControllers | Record<string, NavigationController> | Allow control over the loading, error and success events of the navigation from the backend (controllerId) | ||
viewClient | ViewClient | The default ViewClient | Service responsible for fetching views. Useful for setting up a cache system. |
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.