Giter Site home page Giter Site logo

Comments (11)

why520crazy avatar why520crazy commented on May 26, 2024

采用微前端后,子应用是不可以直接访问的,子应用只提供静态资源文件,所有的路由都是访问 Portal,然后 Portal 会根据路由加载子应用的静态资源。

比如示例中的 Portal 地址是:localhost:3000

当访问 localhost:3000/app1 会加载 App1 的 js 文件和样式文件渲染

from ngx-planet.

why520crazy avatar why520crazy commented on May 26, 2024

如果是独立的应用,会在 js 加载完毕就渲染 Angular 应用,采用微前端后不是直接渲染的,而是主应用(Portal)触发渲染的。

from ngx-planet.

zmzimpl avatar zmzimpl commented on May 26, 2024

如果是独立的应用,会在 js 加载完毕就渲染 Angular 应用,采用微前端后不是直接渲染的,而是主应用(Portal)触发渲染的。

实际生产中会有将一个独立应用嵌入到其他应用中的情况,即既保证其能独立运行,又保证在少量改动之后能够作为微前端中的一个子应用存在。
想知道如果要将一个原本能够独立运行的应用嵌入到以ngx-planet搭建的微前端框架中,需要改动的地方大吗?都需要做哪些处理?

from ngx-planet.

why520crazy avatar why520crazy commented on May 26, 2024

如果既需要独立运行又需要嵌入微前端,需要做多个入口以及适配调整,生成的 HTML 加载的是可以独立运行的脚本,提供一个单独的 main 入口给微前端使用

from ngx-planet.

myzhibie avatar myzhibie commented on May 26, 2024

如果子应用无法独立访问,那么日常开发是如何去做的呢?

from ngx-planet.

why520crazy avatar why520crazy commented on May 26, 2024

使用 Portal 访问啊,因为我们这边的子应用和主应用有数据交互和通信,独立访问不是说不可以,再写一个启动入口,让之前在 Portal 加载的数据在这个入口启动即可。

from ngx-planet.

why520crazy avatar why520crazy commented on May 26, 2024

这个我之后在 Demo 中加一个独立访问的入口吧

from ngx-planet.

myzhibie avatar myzhibie commented on May 26, 2024

这个我之后在 Demo 中加一个独立访问的入口吧

有没有线上生产环境的地址,去观摩一下

from ngx-planet.

why520crazy avatar why520crazy commented on May 26, 2024

https://worktile.com/signup 注册一个企业,选择研发管理类型,进去就是采用 微前端 的产品

from ngx-planet.

zmzimpl avatar zmzimpl commented on May 26, 2024

这个我之后在 Demo 中加一个独立访问的入口吧

请问现在是否有支持单独访问的入口了?

from ngx-planet.

myzhibie avatar myzhibie commented on May 26, 2024

https://worktile.com/signup 注册一个企业,选择研发管理类型,进去就是采用 微前端 的产品

嗯,Chrome没问题,但是IE11还是会报错,worktile不支持IE11?

from ngx-planet.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.