Comments (11)
采用微前端后,子应用是不可以直接访问的,子应用只提供静态资源文件,所有的路由都是访问 Portal,然后 Portal 会根据路由加载子应用的静态资源。
比如示例中的 Portal 地址是:localhost:3000
当访问 localhost:3000/app1
会加载 App1 的 js 文件和样式文件渲染
from ngx-planet.
如果是独立的应用,会在 js 加载完毕就渲染 Angular 应用,采用微前端后不是直接渲染的,而是主应用(Portal)触发渲染的。
from ngx-planet.
如果是独立的应用,会在 js 加载完毕就渲染 Angular 应用,采用微前端后不是直接渲染的,而是主应用(Portal)触发渲染的。
实际生产中会有将一个独立应用嵌入到其他应用中的情况,即既保证其能独立运行,又保证在少量改动之后能够作为微前端中的一个子应用存在。
想知道如果要将一个原本能够独立运行的应用嵌入到以ngx-planet搭建的微前端框架中,需要改动的地方大吗?都需要做哪些处理?
from ngx-planet.
如果既需要独立运行又需要嵌入微前端,需要做多个入口以及适配调整,生成的 HTML 加载的是可以独立运行的脚本,提供一个单独的 main 入口给微前端使用
from ngx-planet.
如果子应用无法独立访问,那么日常开发是如何去做的呢?
from ngx-planet.
使用 Portal 访问啊,因为我们这边的子应用和主应用有数据交互和通信,独立访问不是说不可以,再写一个启动入口,让之前在 Portal 加载的数据在这个入口启动即可。
from ngx-planet.
这个我之后在 Demo 中加一个独立访问的入口吧
from ngx-planet.
这个我之后在 Demo 中加一个独立访问的入口吧
有没有线上生产环境的地址,去观摩一下
from ngx-planet.
https://worktile.com/signup 注册一个企业,选择研发管理类型,进去就是采用 微前端 的产品
from ngx-planet.
这个我之后在 Demo 中加一个独立访问的入口吧
请问现在是否有支持单独访问的入口了?
from ngx-planet.
https://worktile.com/signup 注册一个企业,选择研发管理类型,进去就是采用 微前端 的产品
嗯,Chrome没问题,但是IE11还是会报错,worktile不支持IE11?
from ngx-planet.
Related Issues (20)
- When set strict mode, defineApplication throw error: Type 'PlanetPortalApplication<any> | undefined' is not assignable to type 'PlanetPortalApplication<any>' HOT 3
- appStatusChange observer changed status but not sync to planet.appsStatus
- Chunk file error in lazy loading HOT 5
- Load assets error will cause other preloaded apps to fail to bootstrap
- 能不能和@uirouter/angular一起使用? HOT 1
- when main app navigate url, current child app route 'CanDeactivate' guard navigate not blocked
- Release 13 Iteration Plan
- Upgrade Angular to 13
- TSlint => ESLint
- Build: Add node and npm to engines HOT 1
- Bump ngx-tethys t0 13.0.0-next
- Throw error when refresh one sub app with sandbox isolation enabled
- 子应用热替换不生效 HOT 7
- Add PlanetComponentOutlet like NgComponentOutlet dynamic rendering component of other app
- routing mismatch when routerPathPrefix is similar with other sub application HOT 2
- pingcode中登录模块是子应用吗?有子应用独立运行的例子吗? HOT 7
- v15启动报错 HOT 3
- 无限循环加载主应用的js HOT 1
- PlanetComponentLoader supports direct register of component types and load with component selector
- 在子应用中使用路由时,浏览器后退需要点多次才可后退 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ngx-planet.