AngularJS应用程序不在github页面上工作 [英] AngularJS App not working on github pages

查看:121
本文介绍了AngularJS应用程序不在github页面上工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以这是存储库

https: //github.com/fredericojesus/mygroceries-angular



这是github页面的链接



http://fredericojesus.github.io/mygroceries-angular/



由于某些原因,浏览器没有获取文件(请参阅控制台),但它们真的不知道发生了什么,我是第一次尝试github页面的新手。
任何人都可以帮忙吗?

解决方案

只要删除< base href =/ > index.html 中。然后将文件夹名称添加到路径中。



例如

 < link rel =stylesheethref =styles / lib-25ab91c4a2.css> 
< link rel =stylesheethref =styles / app-2b5253690c.css>

< script src =js / lib-05ac045750.js>< / script>
< script src =js / app-d3af5f3ca4.js>< / script>

希望这有助于您。


So this is the repository

https://github.com/fredericojesus/mygroceries-angular

and this is the link for github pages

http://fredericojesus.github.io/mygroceries-angular/

For some reason the browser is not getting the files (see console), but they exist so really dunno what's happening, I'm new to github pages, first time trying. Can anyone help ?

解决方案

Just remove the <base href="/"> in your index.html. Then add the folder name to the libraries path.

E.g.

<link rel="stylesheet" href="styles/lib-25ab91c4a2.css">
<link rel="stylesheet" href="styles/app-2b5253690c.css">

<script src="js/lib-05ac045750.js"></script>
<script src="js/app-d3af5f3ca4.js"></script>

Hope this helps.

这篇关于AngularJS应用程序不在github页面上工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆