how to send id from one controller to another in angular
<p>I have a basic controller that displays my Software Group name:</p>

<pre><code>var SoftwareGroupApp = angular.module('SoftwareGroupApp', []);
SoftwareGroupApp.controller('SoftwareGroupController', function($scope, $http) {
 $http.get("select_SoftwareGroup.php")

.then(function (response) {$scope.result = response.data.records;});
});
</code></pre>

<p>In my view I'm displaying this Software Group in a list</p>

<pre><code>&lt;ul class="sub-menu"&gt;
            &lt;div ng-app="SoftwareGroupApp" ng-controller="SoftwareGroupController"&gt;
                &lt;li ng-repeat="x in result"&gt;&lt;a class="haschild" title="" href=""&gt;{{ x.GroupName }}&lt;/a&gt;
                    &lt;ul&gt;
                    &lt;div  ng-controller="SoftwareController"&gt;
                        &lt;li ng-repeat="x in names"&gt;&lt;a title="" href=""&gt;{{ x.name }}&lt;/a&gt;&lt;/li&gt;
                    &lt;/div&gt;
                    &lt;/ul&gt;
                &lt;/li&gt;
                &lt;/div&gt;
            &lt;/ul&gt;
</code></pre>

<p>and i have another controller that display my Software name :</p>

<pre><code>var SoftwareApp = angular.module('SoftwareApp', []);
SoftwareApp.controller('SoftwareController', function($scope, $http) {
  $http.get("selectSoftware.php") 
.then(function (response) {$scope.names = response.data.records;});
});
</code></pre>

<p>when someone click on the Software Group name, i have another sub menu that list my software name .</p>

<pre><code> &lt;ul&gt;
                    &lt;div  ng-controller="SoftwareController"&gt;
                        &lt;li ng-repeat="x in names"&gt;&lt;a title="" href=""&gt;{{ x.name }}&lt;/a&gt;&lt;/li&gt;
                    &lt;/div&gt;
                    &lt;/ul&gt;
</code></pre>

<p>What I'm trying to do is when someone click on the Software Group name, my Software group id save in a variable and send to my SoftwareController . and i  display names of software that == id </p>