angularjs - Browser sync not working locally with html5mode -
i'm working on angular app , having issue locally browser-sync. when edit page locally browser-sync tries reload page cannot /weeks5-8.html had same issue live version of site fixed adding htaccess file.
i have tried connect-modrewrite solution didn't work first solution tried.
i've tried historyapifallback solution again didn't work second solution tried.
i'm curious if has had issue , if have solved it. site live. , repo site here.
my browser-sync task follows:
browsersync({ server: { basedir: './dist/', middleware: [ historyapifallback() ] }
the angular file follows:
angular.module('marshmallowandmammy',['ngroute']) .controller('mmcontroller', ['$scope', '$http', '$location', mmcontroller]) .config(['$routeprovider', '$locationprovider', function($routeprovider, $locationprovider){ $routeprovider. when("/", {templateurl:"/partials/homepage.html"}). when("/weeks5-8.html", {templateurl:"/partials/week5-8.html"}); $locationprovider.html5mode(true); }]);
any or advice appreciated. thanks.
Comments
Post a Comment