我有一个。net MVC应用程序在https://localhost:7166/
中运行,我在Angular
中有另一个应用程序在http://localhost:9002/
中运行。我正试着用single-spa
把这些组合成一个microfrontend
。
我有一个基本的应用程序,所有的应用程序都被导入。
<% if (isLocal) { %>
<script type="systemjs-importmap">
{
"imports": {
"@single-spa/welcome": "https://unpkg.com/single-spa-welcome/dist/single-spa-welcome.js",
"@angular-app/angular-project": "http://localhost:9002/main.js",
"@dotnet/home":"http://localhost:7166/"
}
}
</script>
<% } %>
<<p>路线/strong><single-spa-router>
<main>
<route default>
<application name="@dotnet/home"></application>
</route>
<route path="flights-search">
<application name="@angular-flightBooking/angular-flightbooking"></application>
</route>
</main>
</single-spa-router>
angular应用程序运行正常,但是dotnet应用程序在浏览器中返回CORS
问题。有谁能帮帮忙吗?
. net MVC web应用程序不能与single-spa
一起用作微服务。single-spa
只适用于JavaScript框架,这是。net MVC web应用程序而不是的东西。.