diff --git a/app/assets/javascripts/angular_modules/module_report_data.js b/app/assets/javascripts/angular_modules/module_report_data.js index 02b3bc18f9d..be91ce9c43c 100644 --- a/app/assets/javascripts/angular_modules/module_report_data.js +++ b/app/assets/javascripts/angular_modules/module_report_data.js @@ -2,10 +2,4 @@ miqHttpInject( angular.module('ManageIQ.report_data', [ 'miqStaticAssets', 'ui.bootstrap', 'patternfly.views', ]) - .config(['$locationProvider', function($locationProvider) { - $locationProvider.html5Mode({ - enabled: true, - requireBase: false, - }); - }]) ); diff --git a/app/assets/javascripts/angular_modules/module_toolbar.js b/app/assets/javascripts/angular_modules/module_toolbar.js index fe2424122ac..aa2fbcd89e7 100644 --- a/app/assets/javascripts/angular_modules/module_toolbar.js +++ b/app/assets/javascripts/angular_modules/module_toolbar.js @@ -1,11 +1,5 @@ miqHttpInject( angular.module('ManageIQ.toolbar', [ - 'miqStaticAssets', 'ui.bootstrap' + 'miqStaticAssets', 'ui.bootstrap', ]) - .config(['$locationProvider', function ($locationProvider) { - $locationProvider.html5Mode({ - enabled: false, - requireBase: false, - }); - }]) ); diff --git a/app/assets/javascripts/miq_angular_application.js b/app/assets/javascripts/miq_angular_application.js index e2d1e2a3cbf..7daa781ed3a 100644 --- a/app/assets/javascripts/miq_angular_application.js +++ b/app/assets/javascripts/miq_angular_application.js @@ -29,6 +29,14 @@ ManageIQ.constants = { }; function miqHttpInject(angular_app) { + angular_app.config(['$locationProvider', function($locationProvider) { + /** + * hashPrefix must be empty othervise it will conflict with HashRouter and create infinite loop + * React HashRouter can be configured to have hashbang prefix, + * but both $locationProvider and ReactRouter must have the same prefix! + */ + $locationProvider.hashPrefix(''); + }]); angular_app.config(['$httpProvider', function($httpProvider) { $httpProvider.defaults.headers.common['X-Angular-Request'] = true; $httpProvider.defaults.headers.common['X-CSRF-Token'] = function() {