Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Canceling from the form and returning to the top level
Message
From
27/09/2016 03:59:24
 
General information
Forum:
Javascript
Category:
Other
Miscellaneous
Thread ID:
01641209
Message ID:
01641392
Views:
24
>>>>>Looks like in our application these problems outweigh the benefits. Is there a way to change absUrl? We do have a service returning baseUrl I could have used.
>>>>
>>>>As per the docs there are parts of the absUrl that you can change : path, search and hash ( or url which is all of the previous)
>>>>You cannot change protocol, host and port.
>>>>Not sure why you would want to change any of the setter only items anyway ?
>>>
>>>Unfortunately, in the default mode the url returns / and path returns nothing. The absUrl returns the full correct path.
>>
>>I don't see that behaviour. What is the absolute url (in both Hashbang and HTML5 modes) and what do expect to see in $location.path() ?
>>
>Without any setting of $locationProvider I am getting
>
>http://localhost:9999/Salespoints/Preferences - for absUrl
>and nothing for $location.path()
>
>when I uncomment these lines in app.js
>
>
>app.config(['$locationProvider', function ($locationProvider) {
>        $locationProvider.html5Mode(true);
>        $locationProvider.hashPrefix('!');
>    }]);
>
>I get the following:
>
>
> http://localhost:9999/Salespoints/Preferences
> /Salespoints/Preferences
>
>So, in the second case I do get the /Salespoint/Preferences and I do get correct behavior when I use $location.path('/');
>
>But I need to get the correct behavior with these lines commented out in app.js because it causes too many problems for our application.
>
>For now I switched back to window.location.href= userService.baseUrl;

I think that, in Hashbang mode, the url would need to be the following for $location to return the path you expect :
http://localhost:9999#!/Salespoints/Preferences
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform