Skip to content

Instantly share code, notes, and snippets.

@dennis-8
Created July 2, 2018 08:25
Show Gist options
  • Select an option

  • Save dennis-8/58aa88db0812b87a4741cb209ea6f1d4 to your computer and use it in GitHub Desktop.

Select an option

Save dennis-8/58aa88db0812b87a4741cb209ea6f1d4 to your computer and use it in GitHub Desktop.
ui-router, child to parent navigation without refresh
To stop refreshing use dynamic params.
@dennis-8

dennis-8 commented Jul 2, 2018

Copy link
Copy Markdown
Author

Parent params:

params: {
            refresh: {
                dynamic: true,
                inherit: false,
                value: {
                    email: false,
                    sms: false
                }
            }
        }

Child params:

params: {
            refresh: null
        }

In parent's controller:

this.uiOnParamsChanged = function (newParams) {

            console.log("new params: ", newParams);
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment