I want to enable HTML5 mode for my app. I have put the following code for the configuration, as shown here:
return app.config([\'$routeProvider\',\'$location
As others have mentioned, you need to rewrite routes on the server and set
.
For gulp-connect
:
npm install connect-pushstate
var gulp = require('gulp'),
connect = require('gulp-connect'),
pushState = require('connect-pushstate/lib/pushstate').pushState;
...
connect.server({
...
middleware: function (connect, options) {
return [
pushState()
];
}
...
})
....