Pass parameters into ui-view
<p>I'm trying to pass parameters into nested ui-view: </p>

<pre><code>&lt;ui-view user="user"&gt;&lt;/ui-view&gt;
</code></pre>

<p>And now let me explain why do I need this.
That is how my ui looks like:</p>

<p><a href="https://i.stack.imgur.com/UNA4w.png" rel="noreferrer"><img src="https://i.stack.imgur.com/UNA4w.png" alt="enter image description here"></a></p>

<p>It's user card Angular component. Inside this component there are several tabs like subcomponents with own states. My goal is to <strong>provide user object for the tabs</strong> from the parent state. </p>

<p>Let me also show some simplified code:</p>

<pre><code>  .state('user', {
    url: '/user/:userId',
    template: `&lt;user user-id="userId"&gt;&lt;/user&gt;`,
    controller: ($scope, $stateParams) =&gt; {
      $scope.userId = +$stateParams.userId;
    }
  })
  ...
  .state('user.tab1', {
    url: '/tab1',
    template: '&lt;tab1 user="$ctrl.user"&gt;&lt;/tab1&gt;',
    controller: ($scope, $state) =&gt; {
      //I would like to get access to the user object here
      let course = $scope.$ctrl.user;
    }
  });
</code></pre>

<p>So one more time: user object is loaded not in ui-router controller, but controller of component. Template of this component has nested  in which I would like to have user object.</p>