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.
--
You received this message because you are subscribed to the Google Groups
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.