If I understand you correctly, I would do this with ng-repeat, since as you 
add or remove data to the array, it would create new panes (or items, or 
whatever).

<pane ng-repeat="pane in panes" style="float:left;>
  <customer="pane.customer"></customer>
  <item="item" ng-repeat="item in items">
    <transaction="item.transaction">
      <a ng-click="showCustomer(item.transaction.customer)">View 
Customer</a>
    </transaction>
  </item>
</<pane>

function MyCtrl($scope, MyService)
{
  $scope.panes = [
    { items: [ { transaction: { customer: 1 },  transaction: { customer: 3 }  
} ] , customer: 5}, 
    { items: [ { transaction: { customer: 2 },  transaction: { customer: 4 }  
} ] , customer 6 }
  ];

  $scope.showCustomer(customerId){
     var pane = MyService.getCustomer(customerId);
     $scope.panes.push(pane);
  }

}

On Friday, February 21, 2014 10:13:43 PM UTC-7, Alesei N wrote:
>
> I don't think you have to, if I understand you correctly, you can use 
> either ng-if or ng-show. See documentation, but you could basically show 
> these conditionally. NG-IF would be equivalent of conditional/dynamic 
> rendering of any specific directive. NG-SHOW would basically set 
> display:block on the parent element. 
>

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to