I am trying to find where I can enable html5mode in angular2. Unfortunately, it was not possible to find it from the documentation or anywhere. I use gulp and browser sync to download my files. I have seen many say use connect-modrewrite something like
browserSync.instance = browserSync.init({ server: { baseDir: ['app'], middleware: [ proxyMiddleware, modRewrite([ '^[^\\.]*$ /index.html [L]' ]) ] }, });
I installed it, but it still doesn't work, and I get 404 for anything other than the main URL. Any clues about this?
source share