HTML5Mode, AngularJS and Grunt Build Control

79 views Asked by At

Hoping someone can answer this because I'm struggling...

I have an angular js app that was build with the yo-angular generator. All works fine with deploying through grunt build control, as long as I'm not using the #-free "html5mode."

However, once I enable html5mode to remove the # from my routing and then deploy, my app on github pages doesn't point to the correct source for its scripts and such... For instance, I'm getting a 404 error because it's looking for http://{{user name}}.github.io/scripts/{{name of file}}, instead of http://{{user name}}.github.io/{{app name}}/scripts/{{name of file}}

How can I get it to point to the correct directory?

Hope this makes sense. I'll share more if needed!

1

There are 1 answers

0
Wayne Ellery On

You also need to configure the server. The configuration change will depend on what technology you are using to host the app on the server. How to configure your server to work with html5mode