generator-ng-poly icon indicating copy to clipboard operation
generator-ng-poly copied to clipboard

Add Support for $locationProvider.html5Mode(true);

Open msenosiain opened this issue 8 years ago • 2 comments

For using this feature I needed to add a middleware to browsersync initialization mannually. it would be nice to have it as an option when a module is created

msenosiain avatar May 10 '16 00:05 msenosiain

That sounds good to me. If anyone has time for a PR that would be much appreciated.

dustinspecker avatar May 10 '16 22:05 dustinspecker

In case anyone else is looking for how to config browsersync for HTML5 mode, add the middleware by installing this:

npm install connect-history-api-fallback --save-dev

And update gulp/watch.js:

  ...
  gulp.task('browserSync', function() {
    $.browserSync({
      host: config.host,
      open: 'external',
      port: config.port,
      server: {
        verbose: true,
        baseDir: config.buildDir,
        middleware: $.connectHistoryApiFallback()
      }
    });
  });
  ...

tomholford avatar Aug 21 '16 21:08 tomholford