Problem with html5Mode angular

Asked

Viewed 85 times

0

I set up my app Angular using #! in the links url, I am now trying to use the html5Mode but it’s not working.

The folder structure of my application looks like this: At the root is the index.html, a folder with the images, a folder with the CSS, a folder with the files JS I’m using(the very angular.min.js and jQuery) and one last folder called app where are the controller, directives and services angular.

I already inserted $locationProvider.html5Mode(true) in my app.js which is where I define my module name and routes. In the archive index.html (which is where the <ng-view />) inserted the `. When I do this the images of the site disappear and the links stop working.

  • What kind of server are you using? Ex.: I use apache and a setup was required in the . htaccess file as well. About the missing images and css, try adding / at the beginning of href, see if you can solve.

  • I still have it on my machine, I didn’t climb to any server.

1 answer

0


I was able to solve the html5Mode problem. Mine was pointing to a wrong folder address for my project. Now it’s ok!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.