Yeoman’s Gruntfile.js with html5 hashbang

Description

Recently I worked on trying to make my angular application crawlable by google robots. In order to accomplish this I moved my application to html5. The problem however was all sites needed to be redirected from foo.com/newpage to foo.com/#!/newpage. This is required in order to load all the css and javascript for the page. No problem – Nginx is awesome and did this for me. I still had a problem. I want to use grunt serve to do local development work on the application. In order to accomplish this I found a great article talking about angular with html5mode when your application was constructed using yeoman. I ended up having to add mp3 and pdf file types to the mod_rewrite in order to get everything on my site to work. Either way – great article.

Comments are closed.