RafaelVidaurre / angular-permission

Simple route authorization via roles/permissions
MIT License
1.13k stars 212 forks source link

Location transition option being overridden #360

Closed joeljeske closed 7 years ago

joeljeske commented 7 years ago

Similar to https://github.com/Narzerus/angular-permission/issues/211

Due to https://github.com/Narzerus/angular-permission/blob/master/src/permission-ui/permission-ui.js#L116, the location option in the transitions ops is always set to true. This should respect my location option.

Side-note: I do not know why we must broadcast our own $stateChangeSuccess by using notify: false and then re-broadcasting. At minimum, we should respect the user-passed property.

masterspambot commented 7 years ago

Otherwise redirection wouldn't work. It's part of how ui-router was designed. Most of those flaws have been fixed in 1.0.0 though.

joeljeske commented 7 years ago

Ok, I guess I see that location: false might break redirection, but I believe location: replace should be valid. That is my current use case.

I am currently not able to use 1.0 and need to be able to replace location states.