I am trying to use $location with in my App which may sound simple however I have number of issues.
The App is not a top level domain url it is in fact http://foo/bar/php.?/foo=_post.id The url serial number is dynamically input using php along with mysql table content specific to the user id. The page has 2 internal links both of which use the same method to show content relevant to the user id. This is how I had the web App setup *before it did not matter if the page was refreshed*. var _gaq = _gaq || []; var app = angular.module('landingApp', []); app.config(function($locationProvider) { // use the HTML5 History API $locationProvider.html5Mode(true); }); app.controller('landingController', function($scope, $window) { $scope.goto_viewdetail = function(item) { $window.location = '/viewdetail.php?qrcode='+item; }; $scope.goto_sendemail = function(item) { $window.location = '/sendemail.php?qrcode='+item; } }); Problem 1 is in setting the base URL because it is not the top level page it is http://www.foo.com/cats.php?good= <http://www.myepicsite.com/assets/>post.id and the linked page is http://www.foo.com/dogs.php?good= <http://www.myepicsite.com/assets/>post.id <base href="http://www.foo.com/cats.php?good= <http://www.myepicsite.com/assets/>"> so setting the base url to will not work because I am not linking http://foo/cats but foo/dogs Then the next problem is dynamically carrying the post.id! how do I format when $location path is http://example.com/foo/ + post.id $location.path() == '/a' $location.path('/foo'); $location.absUrl() == 'http://example.com/foo' any help would be greatly appreciated! :) -- You received this message because you are subscribed to the Google Groups "AngularJS" 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 http://groups.google.com/group/angular. For more options, visit https://groups.google.com/d/optout.
