2019-08-27 08:32:56 +02:00
|
|
|
<script>
|
2019-09-19 05:35:40 +02:00
|
|
|
import createApp from "./createApp";
|
|
|
|
import { props } from "./props";
|
|
|
|
|
|
|
|
let _app;
|
|
|
|
|
|
|
|
const _appPromise = createApp();
|
|
|
|
_appPromise.then(a => _app = a);
|
|
|
|
|
2019-09-26 06:40:58 +02:00
|
|
|
const testProps = props.nav;
|
2019-09-19 05:35:40 +02:00
|
|
|
|
|
|
|
let currentComponent;
|
|
|
|
|
|
|
|
$: {
|
|
|
|
if(_app && currentComponent) {
|
|
|
|
_app.initialiseComponent(testProps, currentComponent);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-08-27 08:32:56 +02:00
|
|
|
</script>
|
|
|
|
|
2019-09-19 05:35:40 +02:00
|
|
|
{#await _appPromise}
|
|
|
|
loading
|
|
|
|
{:then _app}
|
2019-08-27 08:32:56 +02:00
|
|
|
|
2019-09-19 05:35:40 +02:00
|
|
|
<div id="current_component" bind:this={currentComponent}>
|
2019-08-27 08:32:56 +02:00
|
|
|
</div>
|
|
|
|
|
2019-09-19 05:35:40 +02:00
|
|
|
{/await}
|
|
|
|
|
|
|
|
|
2019-08-27 08:32:56 +02:00
|
|
|
<style>
|
2019-09-19 05:35:40 +02:00
|
|
|
#current_component {
|
2019-08-27 08:32:56 +02:00
|
|
|
height: 100%;
|
|
|
|
width: 100%;
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
|