title: How to send data from one controller to other in angularjs
body: <p>How to send the json data from FirstCtrl to secondCtrl using angularjs.</p>
  
  <p>Can anyone please help me out regarding this ...</p>
  
  <p>First.js:</p>
  
  <pre><code>angular.module('myApp')
      .controller('FirstCtrl', function ($scope) {
  
      //firstCtrl json data
         $.getJSON("sample.json", function (json) {
              console.log(json);
           });
      });
  </code></pre>
  
  <p>Second.js:</p>
  
  <pre><code>angular.module('myApp')
      .controller('secondCtrl', function ($scope) {
  
         //get the firstCtrl json data here
      });
  </code></pre>