I'm currently using a single-spa. And here is an example of the layout I currently have:
<html>
<head>
<template id="single-spa-layout">
<single-spa-router>
<nav class="topnav">
<application name="@organization/nav"></application>
</nav>
<div class="main-content">
<route path="settings">
<application name="@organization/settings"></application>
</route>
<route path="clients">
<application name="@organization/clients"></application>
</route>
</div>
<footer>
<application name="@organization/footer"></application>
</footer>
<application name="@organization/app1"></application>
<application name="@organization/app2"></application>
</single-spa-router>
</template>
</head>
</html>
Here as you can see I am loading app1 and app2 along with settings or clients. But What I really want is to load app1 only when settings are loaded, and app 2 only when clients are loaded.
Now I've been reading about how to implement this using parcels, but I can't wrap my head around how to load these apps dynamically depending on the loaded app, since this only works by matching the route with the app.
Is there anybody that has any idea on how I could do this? or if someone can point me in the right direction?