Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Upload to Firebase Hosting not working correctly

I've just finished building my first web app using AngularJS and Firebase for my real time database. When I run it on localhost everything I want it to do is working good for me. However, when I've loaded it up to Firebase Hosting and gone and opened it, the files haven't loaded correctly.

My CSS file is blank and both my app.js and maincontroller.js files have all of my index.html code in them instead of the JavaScript code that should be there.

Here is a link to my app so you can see what I am talking about.

I've been unable to find any answers for what is causing this/what I'm doing wrong. If anyone is able to help it'd be greatly appreciated.

like image 586
Jake Wansink Avatar asked Oct 29 '22 15:10

Jake Wansink


1 Answers

Here's your problem, from the source of index.html:

<script src="projects/web\ design/in.out/public/app.js"></script>
<script src="projects/web\ design/in.out/public/maincontroller.js"></script>

You have local path names in your <script> tags when they need to be relative to the public directory. These should be changed to /app.js and /maincontroller.js respectively.

like image 200
Michael Bleigh Avatar answered Nov 15 '22 06:11

Michael Bleigh