Issue
I want to get the base path of my Angular app.
Right now I'm doing this: $scope.baseUrl = '$location.host()
But I only get this: /localhost
. My current baseURL is http://localhost:9000/
.
Solution
Try this: $location.$$absUrl
console.log('$location',$location.$$absUrl);
btw /localhost
is your base path, but I guess you meant entire URL.
Answered By - Leon Gaban
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.