I have the following routes:
/**
* General app route
*/
angular
.module('app')
.config(config);
config.$inject = ['$routeProvider', '$locationProvider'];
function config($routeProvider, $locationProvider) {
$routeProvider
.when('/', {
templateUrl: 'partials/index.html',
controller: 'ImageController'
})
.when('/category/:name', {
templateUrl: 'partials/index.html',
controller: 'CategoryController',
})
.when('/404', {
templateUrl: 'partials/404.html'
})
.otherwise({ redirectTo: '/404' });
$locationProvider.html5Mode({
enabled: true,
requireBase: false
});
}
when I'm trying to access the category route from base route it works fine, but when I reload the page on category route it tries to access the assets file through category path instead of base path. how can I fix it?