Luke, I lose you at the <customer> directive. The contents of  a pane is
what I am trying to load dynamically.

So 1 step is for the <pane> directive to retrieve the contents.
But 2, the contents of the pane will have directives (like <customer>) that
must be compiled,

Am I correct?


On Sat, Feb 22, 2014 at 2:27 AM, Luke Kende <[email protected]> wrote:

> 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 a topic in the
> Google Groups "AngularJS" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/angular/WHSBzWsle2k/unsubscribe.
> To unsubscribe from this group and all its topics, 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.
>



-- 
Jacob Valenta

-- 
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