我正在處理一個包含數百個組件的復雜專案,很快新團隊將開始與我們合作。我們的目標是讓我們的開發、構建和部署程序完全分開。
主應用程式(已開發)團隊 1 在埠 4200 上啟動,帶有選單、標題、內容部分()。
從屬應用程式 - 團隊 2 我們希望在我們的內容部分中加載他們的組件,如果他們創建了一個新組件和新路由,我們希望在主應用程式中加載它而無需重建主應用程式
有沒有辦法實作這一目標?或任何類似的建議
實際上我們正在考慮用 iframe 來做(但我不喜歡這個解決方案)
謝謝
uj5u.com熱心網友回復:
使用 angular-cli 支持的 monorepostyle 多專案作業區已經有一段時間了。您將能夠像集成單個應用程式一樣集成兩個應用程式。
uj5u.com熱心網友回復:
如果您不想重建主應用程式,則可以使用微前端方法。在這里您可以找到更多資訊:https : //www.angulararchitects.io/en/aktuelles/the-microfrontend-revolution-part-2-module-federation-with-angular/
There are several talk (on youtube) by Manfred Steyer about the topic. The example application he always is talking about is a flight app, one team is providing the booking section and the other ...
The main application loads the content from another application and the application do share for example the angular framework.
If it is no problem to rebuild you application i suggestion a mono repository managed by NX ... maybe you can give it a try.
轉載請註明出處,本文鏈接:https://www.uj5u.com/qiye/349698.html
