Q: Select is not binding to a value when return from a state I have following select list in ControllerA
<select ng-model="selecteditem" ng-change="selectedItem(selecteditem)" ng-options="item.id as item.name for item in items" ></select>

and I have two methods, Add() and Update() in ControllerB and they are almost same
 $scope.add = function (g) {
    if (g != '') {
        .
        .
        .
        .
        $scope.grade = {};
        $state.go('grades', { selecteditem: g, items: $scope.items }, false);
    }
}

in ControllerA
 $scope.$on('$ionicView.beforeEnter', function (viewData) {
        if ($stateParams.items != null && $stateParams.items.length > 0) {
            $scope.items = $stateParams.items;
            $scope.selecteditem= $stateParams.selecteditem;
            ....
        }
        else {
           ......
        }
    });

in the Add() function, everything is working fine but in the Update() function, when I go back to ControllerA, select is not binding to selecteditem and displaying an empty value at start. What is the problem?

A: There are couple of options.
How are this controllers related? 


*

*You can always access parent's controller scope by $parent:
$scope.$parent.selectedItem = ..... 

*You can use $rootScope which is accessible from every controller
$rootScope.selectedItem = .....
you need to inject $rootScope into your controller

*Using service is probably the best option:
.service('myService', function () {
    this.selectedItem = null;
});
You can inject your service into controllers and then set/access required variables like:
myService.selectedItem = ..........
