title: Angular: ui-router how to pass data object or some parameter to other controller through state
body: <p>I'm already read about resolve, data for ui-router but still can not get how I can solve my problem?</p>
  
  <p>View 1 HTML:</p>
  
  <pre><code>&lt;a ui-sref="configuration.settings.list"&gt;&lt;span&gt;Settings&lt;/span&gt;&lt;/a&gt;
  &lt;a ui-sref="configuration.settings.personal({user: userId})"&gt;&lt;span &gt;Personal&lt;/span&gt;&lt;/a&gt;
  </code></pre>
  
  <p><code>userId</code> is variable which is defined in the controller for current view.</p>
  
  <p>Route definition:</p>
  
  <pre><code>angular.module("app").config(["$stateProvider", "$urlRouterProvider", "$locationProvider", 
  function($stateProvider, $urlRouterProvider, $locationProvider) {
  
  
      $stateProvider
  
      .state('configuration.settings.lis', {
          url: '/',
          templateUrl: 'html/settings',
          controller: 'settingsController',
      }),
      .state('configuration.settings.personal', {
          url: '/:userId',
          templateUrl: 'html/settings',
          controller: 'personalController',
      }),
  </code></pre>
  
  <p>I can access <code>userId</code> in <code>personalController</code> through <code>stateParams</code>.</p>
  
  <p>Question: I want pass object or some parameter from <code>View 1</code> to <code>personalController</code> without `stateParams. Is it possible?</p>
  
  <p>Something like that:</p>
  
  <pre><code>&lt;a ui-sref="configuration.settings.personal({myDamnCooLObject})"&gt;&lt;span &gt;Personal&lt;/span&gt;&lt;/a&gt;
  
  
  .state('configuration.settings.personal', {
          url: '/', &lt;-- NO attributes here!!!
          templateUrl: 'html/settings',
          controller: 'personalController',
          data: {{myDamnCooLObject}} &lt;-- THIS object or parameter shuld be accesseble from 'personalController'
      })
  </code></pre>