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";
|
|
|
|
|
2019-09-27 18:03:31 +02:00
|
|
|
let _bb;
|
2019-09-19 05:35:40 +02:00
|
|
|
|
|
|
|
const _appPromise = createApp();
|
2019-09-27 18:03:31 +02:00
|
|
|
_appPromise.then(a => _bb = a);
|
2019-09-19 05:35:40 +02:00
|
|
|
|
2020-01-18 10:00:18 +01:00
|
|
|
const testProps = props.divWithAFewControls;
|
2019-09-19 05:35:40 +02:00
|
|
|
|
|
|
|
let currentComponent;
|
|
|
|
|
|
|
|
$: {
|
2019-09-27 18:03:31 +02:00
|
|
|
if(_bb && currentComponent) {
|
2020-01-18 10:00:18 +01:00
|
|
|
_bb.hydrateChildren(testProps._children, currentComponent);
|
2019-09-19 05:35:40 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-08-27 08:32:56 +02:00
|
|
|
</script>
|
|
|
|
|
2019-09-19 05:35:40 +02:00
|
|
|
{#await _appPromise}
|
|
|
|
loading
|
2019-09-27 18:03:31 +02:00
|
|
|
{:then _bb}
|
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>
|
|
|
|
|