Anil wagh
Anil wagh

Reputation: 273

AngularJs Transclude with ng-repeat and multi transclude

I want to user directive inside ng-repeat of other directive with transclusion.

I am able to user multitransclude outside of ng-repeat, however I want <comment-popover> to be inside of <comment> directives ng-repeat region. Here is my code.

Note: I can not use <ng-transclude>, as my comment directive will be used by other part of the application, where i wont have popover child directive

Here is my code link: https://codepen.io/waghanil87/pen/PmORLL

Thanks in advance

Upvotes: 0

Views: 62

Answers (1)

quirimmo
quirimmo

Reputation: 9988

Have you tried to define the transclusion that you want only in one section as optional?

transclude: {
  'mandatory': 'mandatory',
  'optional': '?optional'
}

Upvotes: 1

Related Questions