title: Call one controller under another controller in angularjs
body: <p>i want to call Homecontroller under the LoginController. below is the code of both controller:</p>
  
  <pre><code>//Login controller
      app.controller('LoginController', function ($scope, $cookieStore) {
          $cookieStore.put('email','test@gmail.com');
          // need to call Homecontroller here
      });
  
  // Home controller
  app.controller('HomeController', function ($scope, $cookieStore, $location) {
  
  
        if ($cookieStore.get('email') != null) {
              $scope.wecomeMessage = $cookieStore.get('email');
          }
          else
          {
              $scope.wecomeMessage = "";
          }
      });
  </code></pre>