"> ..... 这就是我的“index.html”的样子,我在“v-6ren">
gpt4 book ai didi

javascript - 不加载 CSS 和 JS ngBoilerplate

转载 作者:行者123 更新时间:2023-11-28 05:41:24 24 4
gpt4 key购买 nike

我是 AngularJS 的新手,我正在使用 ngBoilerplate 元素作为开始。

.....
<!-- compiled CSS --><% styles.forEach( function ( file ) { %>
<link rel="stylesheet" type="text/css" href="<%= file %>" /><% }); %>

<!-- compiled JavaScript --><% scripts.forEach( function ( file ) { %>
<script type="text/javascript" src="<%= file %>"></script><% }); %>
.....

这就是我的“index.html”的样子,我在“vendor”文件夹中拥有所有需要的 JS 和 CSS。但在浏览器中我最终得到:

enter image description here

控制台中出现错误,您可以假设未加载 JS 和 CSS。有人可以给我建议该怎么做吗?

最佳答案

已修复!

我刚刚将 Apache 配置(#DocumentRoot 和 #< Directory .. >)设置为 .../myProjectClient/src(其中有一个 index.html)而不是 .../myProjectClient/build 哪里是带有生成的脚本和链接的 index.html....

关于javascript - 不加载 CSS 和 JS ngBoilerplate,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37862937/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com