So I have an angular page at **localhost:8080/quote-and-book** whom I specify a base href url like
<base href="/">
or like this
<base href="/quote-and-book">
but these cause every link in the page to freeze and refuse to route to another page even though the browser address location is changed.
However if I specify like this
<base href="/quote-and-book"
the link will be working but location provider will start having issue as $location.search() will be empty(undefined). In my angular code I have these configurations
function Ctrl(service, $location) {
var ctrl = this
var s = $location.search()
ctrl.isDomestic = s.isDom ? JSON.parse(s.isDom) : true
...
}
app = angular.module("app", ['ngAnimate', 'menubar', 'angular.chosen'])
app.controller("Ctrl", ['service', '$location', Ctrl])
app.config(['$locationProvider', function ($locationProvider) {
$locationProvider.html5Mode(true);
}]);
Please do help figure out what I may not be doing correctly and how to fix this such that location provider will provide data of url using $location.search() and <a>links in the page will go to specify href location on click.