Document iframeing and WebComponent

This commit is contained in:
Kristóf Tóth 2018-04-25 14:46:46 +02:00
parent 52cfd4bf55
commit c73cbead71
1 changed files with 12 additions and 1 deletions

View File

@ -71,7 +71,18 @@ You can use the `MessageSender` class to send messages from the TFW server or ev
### Web customisable component
... explain iframing and custom Angular components...
In some of our layouts there is space allocated for a custom webservice or Angular component.
This allows you to embed your own website in the TFW frontend.
There are two ways to do this:
If you'd like to avoid Angular you can run your own webserver on the backend and use our dashboard's `iframe`ing capabilities to include it.
To enable this feature you have to edit `src/app/config.ts` and set `config.dashboard.iframeUrl` to the route your server is listening on.
Note that setting up a custom server is documented in the [test-tutorial-framework](https://github.com/avatao-content/test-tutorial-framework) repo.
Alternatively you can create your own Angular component(s) in `src/app/web`.
Just rewrite `WebComponent` as you please or even nest more components into it if needed.
Note that you must set `config.dashboard.iframeUrl` to an empty string(`''`) to enable the displaying of `WebComponent` (this also disables `iframe`ing).
### Dashboard