Embedded App

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.

Methods

Method
Description

setData(data: any)

sets app data

reload()

resets the embedded app

Triggers

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

Communicating with an embedded app

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.

Sending data from a parent app to an embedded app

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.

Sending data from an embedded app to a parent app

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.

Last updated

Was this helpful?