title: Angular UI Router: decide child state template on the basis of parent resolved object
body: <p>this is my app.js file-
  i have one parent state and two child states.
  Both the child views need the object.</p>
  
  <pre><code>    states.push({
        name: 'parentstate',
        url: '/parent/:objId',
        abstract: true,
        templateUrl: 'views/parentview.html',
        controller: function() {},
        resolve: {
          obj: function(OBJ, $stateParams) {
            return OBJ.get($stateParams.objId);
          }
        }
      });
  </code></pre>
  
  <p>i want to use this resolved obj to decide child template</p>
  
  <pre><code>    states.push({
        name: 'parentstate.childs',
        url: '/edit',
        views: {
          "view1@parentstate": {
            templateUrl: 'views/view1',
            controller: 'view1Ctrl'
          },
          "view2@parentstate": {
            templateUrl: function(obj) {
              if (obj.something == something) {
                return "views/view2first.html";
             } else {
                return 'views/view2second.html';
              }
            },
            controller: 'view2Ctrl'
          }
        }  
      });
  </code></pre>
  
  <p>How can i achieve this?</p>