-
Notifications
You must be signed in to change notification settings - Fork 3k
Controller is reloaded on $state.go despite notify set to false. #3533
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I have the same issue but I read that notify:false doesn't work anymore. |
I've been struggling with this for over 2 days myself. I need to update the URL (as well as the browser history record) without actually re-loading the page/controllers. I've tried just about every combination possible using both deprecated and "supported" options and methods and have yet to figure out a working solution. Most of the information I've read says to use 'dynamic' on your state definition params (if that's what's changing or you want to change). However, I've found that doesn't update the URL or add an entry to browser history. |
Never good when you find yourself on a fresh issue thread after fighting with something for the better part of 2 days. |
For those still following along, checkout the comments about the usage of notify: #1758 |
Is there a workaround we can follow? |
I too had the same problem in spite adding parameters in $state.go, it was still reloading the controller Setting the value reloadOnSearch to false did the trick for me. |
add
In your controller |
relates to #3650 |
think dynamic parameters is what replaced notify:false option |
People generally used Dynamic parameters are intended to implement this most common use case, but in a way that isn't a horrible hack. Here is the current docs for dynamic parameter which describes what they do: https://ui-router.github.io/ng1/docs/latest/interfaces/params.paramdeclaration.html#dynamic |
here's a simple dynamic parameter example: https://stackblitz.com/edit/ui-router-angularjs-dynamic-parameter?file=app.js it uses |
With so much delay, thanks... |
Hello,
My version of UI-Router is: (1.5)
Bug Report
Current Behavior:
Controller is reloaded with
$state.go('myApp', { }, {
notify: false,
reload: false,
location: 'replace',
inherit: false
});
Expected Behavior:
Should the controller not reload with this options? I need to change the URL without reloading controller.
The text was updated successfully, but these errors were encountered: