AngularJS with ui-router: Changing value of a parent dependency of from child's controller <p><strong>Environment</strong>: AngularJS application (using UI Router) that has nested states.</p> <p><strong>Short version:</strong> How do I change the value of a parent-state's dependency from inside a child's controller, such that siblings of the child state, who are also using the dependency will get the new value.</p> <p><strong>Long version</strong>: Take the following configuration:</p> <pre><code>shopApp.config(function($stateProvider) { $stateProvider.state('shop', { url : '/shop', templateUrl : 'shop.html', resolve : { user : function($q) { // callback that ends up returning null // because the user is not logged in } }, controller: function($scope, user) { // user is null at this point $scope.user = user; } }).state('shop.login', { url : '/login', templateUrl : 'login.html', controller : function($scope) { // onLoggedIn is called from some form-processing // logic once the user has successfully logged in $scope.onLoggedIn = function(userObject) { // I want the shop.userDetails state's controller // to get the new $scope.user value $scope.user = userObject; $state.go('^.userDetails'); }; } }).state('shop.userDetails', { url : '/userDetails', templateUrl : 'userDetails.html', controller : function($scope, user) { // Unfortunately user is null here $scope.user = user; } }); }); </code></pre> <p>The <em>shop.login</em> state's controller has a function called <em>onLoggedIn</em> that's called once the user has logged in successfully. An object containing user-information is passed to this function. From this point on I want all resolutions of the <em>user</em> dependency to use this value (i.e <em>userObj</em>). Unfortunately, instead of using the value that I've just assigned to <em>$scope.user</em>, it seems that the value that gets passed to the controller of <em>shop.userDetails</em> is the one that was originally resolved when the <em>shop</em> state's controller was created.</p> <p>Does anyone know how to do this? If I'm doing this all wrong please tell me.</p>