ngUpgraders / ng-forward

The default solution for those that want to write Angular 2.x style code in Angular 1.x
411 stars 36 forks source link

transclusion with ng-forward #44

Closed david-gang closed 8 years ago

david-gang commented 8 years ago

How may i migrate a directive with transclusion? Will ng-forward support the content tag like in angular2? If not what will be the preferred solution?

MikeRyanDev commented 8 years ago

We're going to follow the same path as Angular 1.5's new component helper and turn on transclusion by default for all components. This is OK because in Angular 1.5 transcluded content is not even parsed until the transclude function is called on it.

It should also be noted that we do not plan on supporting a content tag. Instead, use the ng-transclude directive as an element to make swapping it out for a content tag easy.

Transclusion by default will land in our next release. Until then, feel free to use the internal @Transclude decorator on your component.

david-gang commented 8 years ago

thanks

david-gang commented 8 years ago

Hi @MikeRyan52 . I think it would be helpful to have a remark on this in the documentation. I am sure i won't be the only person who asks this