AngularJS App not working on github pages

余生长醉 提交于 2020-01-13 06:04:44

问题


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 ?


回答1:


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.




回答2:


I was facing same problem without the below answer helped me. Taking off this meta tag made the github page work.

<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" >


来源:https://stackoverflow.com/questions/32643449/angularjs-app-not-working-on-github-pages

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!