title: AngularJS ui-router views with custom data
body: <p>I have an AngularJS app and use the ui-router for routing. One of my pages has two similar sections with the same template and logic (so I hope they can use the same controller). The only difference between them is for example <code>type</code> property. Here is simplified fiddle of the page: <a href="http://jsfiddle.net/e_gluhotorenko/XeX59/7/" rel="nofollow">http://jsfiddle.net/e_gluhotorenko/XeX59/7/</a>. </p>
  
  <p>So Is it possible to provide custom <strong>different</strong> data to the views's scopes ? Something like custom data in states but for views:</p>
  
  <pre><code>views: {
      'section1' : {
          templateUrl: 'section.html',
          controller : 'ctrl',
          data : { type: 'type1'}
      },
      'section2' : {
          templateUrl: 'section.html',
          controller : 'ctrl',
          data : { type: 'type2'}
      }
  }
  </code></pre>
  
  <p>Or with <code>ui-view</code> directive like in <code>ng-inclide</code>'s <code>onload</code>:</p>
  
  <pre><code>&lt;div ui-view="section1" onload="type = 'type1'"&gt;&lt;/div&gt;
  &lt;div ui-view="section2" onload="type = 'type2'"&gt;&lt;/div&gt;
  </code></pre>