title: how to store objects in one array in common controller whose objects attribute are set from two different forms
body: <pre><code>sampleApp.controller('maincontroller',function($scope,$rootScope){      
      $rootScope.person=[];   
  })   
  
  sampleApp.controller('AddPersonalDetails',['$scope','myService',function($scope,myService,$rootscope) {
  
        $scope.addData=function(){
          // $scope.data.pname=data.name;
           $scope.person.push($scope.data);
    console.log(person);  
       }     
  
  }]);
  
  
  sampleApp.controller('AddEducationalDetails', ['$scope','myService',function($scope,myService,$rootscope) {
  
      $scope.addMydata=function(){
  
          $scope.person.push($scope.data); 
  
       }           
  }]);
  </code></pre>
  
  <p>i want to add objects attribute from different controllers as data and want to store in single object and that object store in array of person in main controller ..</p>
  
  <p>common controllr -- add data.name
  personal controllr -- add personl details
  educatinal controllr -- add educational details..</p>
  
  <p>help me out to sort this problem</p>