zachsnow / ng-multi-transclude

ng-multi-transclude
MIT License
79 stars 19 forks source link

Concurrency issue #38

Open gregolsen opened 8 years ago

gregolsen commented 8 years ago

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

zachsnow commented 8 years ago

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.

gregolsen commented 8 years ago

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