Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Support for $locationProvider.html5Mode(true); #317

Open
msenosiain opened this issue May 10, 2016 · 2 comments
Open

Add Support for $locationProvider.html5Mode(true); #317

msenosiain opened this issue May 10, 2016 · 2 comments

Comments

@msenosiain
Copy link

msenosiain commented May 10, 2016

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

@dustinspecker
Copy link
Owner

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

@tomholford
Copy link

tomholford commented Aug 21, 2016

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()
      }
    });
  });
  ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants