Closed sagrawal31 closed 7 years ago
Actually, I figured out. This is because of location: true
here https://github.com/Narzerus/angular-permission/blob/master/dist/angular-permission-ui.js#L138
But what is the use of location: true
there?
@masterspambot here is the commit that changed location: 'replace'
to location: true
https://github.com/Narzerus/angular-permission/commit/3ea0e9e05221efa8fa81aab6748487c2f7656ad8 for issue #229. Even location: true
is not needed here (as much as I understand). If someone wants to set any value for location
then they can always use TransitionProperties.options
.
Sorry but it can't. For sure try I even tried to run it today without flag set. Then the history is empty (try to navigate back in broswer).
Hi @masterspambot so what can be the alternative to achieve both the use-cases? Can you please suggest some
First of all, amazing library! π I started developing a separate module for role based security for client side but then I found this library and stopped development of that π
I'm using angular 1.5.8, angular-ui-router 0.2.18 & 5.1.0 version of this library. I have enabled the HTML5 mode in the app. Everything was working fine in my app until today when I starting making use of
$location.search()
method.My module is including dependencies as:
I have a simple user listing page with various filters. I'm changing the app so that whenever filter changes, I set it on the URL (so that user can share the URL with applied filters), for example
$location.search({query: 'john', sort: 'email'})
. This is working fine and the URL is getting changed fromhttp://localhost:9000/user/list
tohttp://localhost:9000/user/list?query=john&sort=email
when filter changes.But when I'm refreshing the page, the query params are getting removed and URL is being changed to
http://localhost:9000/user/list
. I have been searching the cause for this issue the whole day and gone through various GitHub issues of Angular, ui-router and SO posts but nothing helped me.Then I started trial & error and removed this library module completely and things started working fine. I researched more and found out that it's actually the
permission.ui
module that is causing this problem so if I just remove thepermission.ui
module from the app, that query string persists on refreshing the page.I don't understand how the
permission.ui
module is making that issue and what is the fix for that.