angularjs 1.6.0 (latest now) routes not working

Simply use hashbang #! in the href: <a href=”#!/add-quote”>Add Quote</a> Due to aa077e8, the default hash-prefix used for $location hash-bang URLs has changed from the empty string (”) to the bang (‘!’). If you actually want to have no hash-prefix, then you can restore the previous behavior by adding a configuration block to your application: … Read more

$location / switching between html5 and hashbang mode / link rewriting

The documentation is not very clear about AngularJS routing. It talks about Hashbang and HTML5 mode. In fact, AngularJS routing operates in three modes: Hashbang Mode HTML5 Mode Hashbang in HTML5 Mode For each mode there is a a respective LocationUrl class (LocationHashbangUrl, LocationUrl and LocationHashbangInHTML5Url). In order to simulate URL rewriting you must actually … Read more

Reloading the page gives wrong GET request with AngularJS HTML5 mode

I had a similar problem and I solved it by: Using <base href=”https://stackoverflow.com/index.html”> in the index page Using a catch all route middleware in my node/Express server as follows (put it after the router): app.use(function(req, res) { res.sendfile(__dirname + ‘/Public/index.html’); }); I think that should get you up and running. If you use an apache … Read more