Embedded App
Last updated
Was this helpful?
Last updated
Was this helpful?
An embedded app provides a seamless way to integrate one UI Bakery app within another. This feature enables the reuse of extensive logic blocks across multiple applications.
Embedded apps are perfect for handling complex logic but can slow down page loading. We recommend to avoid using them unless multipage functionality is necessary - otherwise use instead.
setData(data: any)
sets app data
reload()
resets the embedded app
Triggers allow you to launch certain actions based on different events.
On Load
Calls for an action as embedded app has been loaded
On Event
Calls for an action as embedded app fired event
In this section, we'll review two ways of communicating with an app - sending data from the parent app to the embedded app and vice versa.
You can send the data to an embedded app by calling the {{ui.app.setData({userId:1})}}
method. Alternatively, you can also set the embedded app data in its Data field.
Then, in the embedded app, you can also subscribe to the On App Data trigger with the last received value accessible in the {{app.data}}
variable.
To send the data from an embedded app to a parent app, you can call the {{app.triggerEvent({data:'data from embedded app'})}}
method from any embedded app's code step.
Then, in the parent app, you can subscribe to the embedded app's On Event trigger, with the last received value accessible in the {{ui.app.value}}
variable.