我想製作一個war文件在apache tomcat服務器上部署angular2項目。我做了一個maven項目並在其中插入了angular2項目。然後我使用angular-cli在maven項目的src/main中創建了webapp文件夾(而不是angular2項目中的dist文件夾)。當我運行Apache服務器時,它顯示以下錯誤。如何從角度2(angular-cli)項目製作WAR文件?
Error loading http://localhost:8080/vendor/angularfire2/angularfire2.js as "angularfire2" from http://localhost:8080/app/app.module.js ; Zone: ; Task: Promise.then ; Value: Error: Error: XHR error (404 Not Found) loading http://localhost:8080/traceur (…) null
這看起來像麻煩的依賴是angularfire2。如何判斷我們的?順便說一句,我使用angular2 rc-5。
我已經通過創建一飲而盡任務解決了這個問題與另一個angular2的種子解決這個問題:https://github.com/mgechev/angular2-seed/wiki/Deployment-as-WAR – Lonely