Installation
To use the Web Component in your website, you must:
- firstly, install the package @orchy-mfe/web-component from
npm
; - secondly, register the Web Component with:
import '@orchy-mfe/web-component'
- finally, you can use it inside your page with:
<orchy-wc basePath={basePath} configurationName={configurationName}></orchy-wc>
Attributes
To configure its behavior, the Web Component exposes two attributes:
basePath
: the base path that will be used by the internal router to handle the Micro Frontends loading.
Its default value is the value ofwindow.location.pathname
when the Web Component is inserted in the page;configurationName
: the name of the configuration that will be fetched to orchestrate your pages and your Micro Frontends.
Its default value isorchy-config.json
.
Properties
To configure its behavior, the Web Component exposes one property:
eventBus
: aneventBus
instance used to better integrate your existing application. It also enables automatically the communication between nestedorchy
instances.
By defaultorchy
creates its owneventBus
instance internally.
In the next section, we will do a deep dive in the configuration content structure.