Closed groner closed 10 years ago
I am not sure I understand what you are describing. Is it possible for you to create a plunkr? or provide the basic parts of your stat configuration?
You can use the template provided at: http://dotjem.github.io/angular-routing/ To quickly start a plunkr.
Ok, here is a demonstration: http://plnkr.co/edit/ixXq4iNJzVdXVU2XRTVb
Enabling reloadOnSearch: false
is causing the state to not load at all.
I saw that behavior in my app with v0.6.1, but it started working with
v0.6.2. I'll see if I can figure out what the difference is, but I guess
that's a separate issue.
If you click on the "Items" tab, you will see a list of items with a search
field. The search is applied by ng-submit
(hit enter) or ng-blur
.
Searches are routed through $state
, so we get a useful history.
In v0.6.2 the parameters no longer appear in the url, unless the url already contains a query string. I've provided a "[q=j]" link that has a query string.
On Fri, May 30, 2014 at 12:47 PM, Jens Melgaard notifications@github.com wrote:
I am not sure I understand what you are describing. Is it possible for you to create a plunkr? or provide the basic parts of your stat configuration?
You can use the template provided at: http://dotjem.github.io/angular-routing/ To quickly start a plunkr.
— Reply to this email directly or view it on GitHub https://github.com/dotJEM/angular-routing/issues/104#issuecomment-44672726 .
It seems reloadOnSearch: false
routes/states aren't loading in Firefox. I'll open another issue about that.
I've uncommented the reloadOnSearch: false
in my plunk.
Pointing at the head now: http://plnkr.co/edit/rou4LVq9ccLLpBs2c0Le?p=preview Things seem to be in order.
Please reopen this issue if you have more findings. Thanks.
@jeme Thanks. This seems to have fixed reloadOnSearch: false
, but the state parameters are still missing from window.location
when there is no query string.
The url should end with /items
.
a
into the search box and hit enterThe url should end with /items?q=a
, but it does not.
If you clicked on the q=j link instead of the Items link, then this step does update the url.
BTW, I'm not able to reopen this issue.
Ok, that seems to be in order by switching the pipeline steps for raiseUpdate and updateRoute around.
That appears to have done the trick. Thanks so much for your help, @jeme.
@jeme Will you be making a 0.6.3 release?
That is very likely, I am in the middle of introducing a pipeline concept around transitions, so that is what is dragging it out right now.
@groner FYI there is a 0.6.3-beta.1
release now.
I have an index view with filters that are applied using
$state.goto()
and the search is executed when$stateUpdate
is observed. This much works pretty well, but the params are only applied to$location
if a query string is already present. If the location has no query string, then the params are not reflected in the location.