You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi all,
I'm trying to create a route that call an application with the same name of the route.
For now I have two applications ("u-app1" and "u-app2") that are called when the path is equal to application name ("/u-app1" and "/u-app2") and this works:
<single-spa-router>
<!--
This is the single-spa Layout Definition for your microfrontends.
See https://single-spa.js.org/docs/layout-definition/ for more information.
-->
<div class="w3-container w3-blue">
<main class="w3-row">
<div class="w3-col s3 ">
<application name="@user-frontend/u-header"></application>
<application name="@user-frontend/u-nav"></application>
</div>
<div class="w3-col s9">
<route path="u-app1">
<application name="@user-frontend/u-app1"></application>
</route>
<route path="u-app2">
<application name="@user-frontend/u-app2"></application>
</route>
<route default>
<h1 style="padding: 30px;">U-VIEW application</h1>
</route>
</div>
</main>
</div>
</single-spa-router>
Now I'm trying to use the path as a variable to select the application; but I don't know how to do it
In my mind this can be a pseudo code:
<single-spa-router>
<!--
This is the single-spa Layout Definition for your microfrontends.
See https://single-spa.js.org/docs/layout-definition/ for more information.
-->
<div class="w3-container w3-blue">
<main class="w3-row">
<div class="w3-col s3 ">
<application name="@user-frontend/u-header"></application>
<application name="@user-frontend/u-nav"></application>
</div>
<div class="w3-col s9">
<route path="/:appname">
<application name=params.appname></application>
</route>
<route default>
<h1 style="padding: 30px;">U-VIEW application</h1>
</route>
</div>
</main>
</div>
</single-spa-router>
How can I pass the path variable as the application name?
The text was updated successfully, but these errors were encountered:
Hi all,
I'm trying to create a route that call an application with the same name of the route.
For now I have two applications ("u-app1" and "u-app2") that are called when the path is equal to application name ("/u-app1" and "/u-app2") and this works:
Now I'm trying to use the path as a variable to select the application; but I don't know how to do it
In my mind this can be a pseudo code:
How can I pass the path variable as the application name?
The text was updated successfully, but these errors were encountered: