ng-multi-transclude icon indicating copy to clipboard operation
ng-multi-transclude copied to clipboard

Concurrency issue

Open gregolsen opened this issue 9 years ago • 2 comments

Let's say we have a template like this:

<!-- mainDirective template -->
<div ng-multi-transclude-controller>
  <div ng-multi-transclude='placeholder'></div>
</div>

<!-- myCustomDirective template -->
<div name='placeholder'>
  Content goes here
</div>

<!-- Usage -->
<main-directive>
  <my-custom-directive></my-custom-directive>
</main-directive>

If mainDirective template loads before myCustomDirective template then custom directive is not going to be rendered at the time multi transclusion will take place. Which means at the time of multi transclusion div with name=placeholder is not going to be present and nothing is going to be transcluded into placeholder.

The workaround is to always have div with proper name inside main-directive directly and not in another directive

gregolsen avatar Jan 27 '16 16:01 gregolsen

Thanks for the report. I think this would be technically working "as intended" as the names of the multi-transclusion wouldn't be available in the my-custom-directive body. However, as noted this library is anyways obsolete as of AngularJS 1.5.

zachsnow avatar Jan 27 '16 20:01 zachsnow

Believe it or not – but we are on 1.2.26 still :-) Thanks for this handy tool!

gregolsen avatar Jan 28 '16 11:01 gregolsen