0

I'm doing multi-slot transclusion. My directive template (important bits):

<div>
  <div ng-transclude-slot='title'></div>
  <div ng-transclude-slot='body'></div>
</div>

Right now my transclude property in my directive definition looks like this:

transclude: {
  title: '?h1',
  body: '?div'
}

What if I want title to be able to take more than just <h1> elements though? Something like:

transclude: {
  title: '?h1?h2?h3',
  body: '?div'
}
Jay
  • 3,471
  • 4
  • 35
  • 49
  • you will have to wrap h1 h2 h3 in a div and transclude the div – gyc Jul 29 '16 at 09:18
  • @gyc that might work because `div` and `h*` are all block level elements but it seems like it would break down if the slot can take entirely different types of elements right? – Jay Jul 29 '16 at 17:16

0 Answers0