【发布时间】:2019-01-15 10:39:31
【问题描述】:
我使用 Sails.JS 作为后端,使用 Angular 6 作为前端。在我的应用程序的 homepage.ejs 中,我需要从 assets 文件夹中加载 HTML:
<!DOCTYPE html>
<html>
<!-- webpack generate html -->
<%- partial('../assets/dist/index.html') %>
</html>
但是,我在访问 http://localhost:1337/ 时遇到错误:
F:\development\SchoolERP\views\pages\homepage.ejs:5 3| 4| >> 5| 6| 7|在 Object.partial 中找不到部分 ../assets/dist/index.html (F:\development\SchoolERP\node_modules\sails\lib\hooks\views\default-view-rendering-fn.js:305:11)
然而,我的 Angular 6 URL 在http://localhost:4200 上运行良好。
【问题讨论】: