angular-deckgrid icon indicating copy to clipboard operation
angular-deckgrid copied to clipboard

Nested transclude broken

Open jzahka opened this issue 9 years ago • 2 comments

When you include using the transclude method of inserting card template, and the contents include a directive that has a transclude, things get wonky.

Here is an example codepen.

[ngTransclude:orphan] Illegal use of ngTransclude directive in the template! No parent directive that requires a transclusion found.

jzahka avatar Jun 28 '16 20:06 jzahka

Can confirm when using with Angular Material's <md-button> directive.

kbarresi avatar Jun 28 '16 21:06 kbarresi

I've forked repo and made changes to use ng-transclude instead of ng-include which fixes the scope issues - at the cost of deprecating using cardTemplate and cardTemplateString.

And you'll have to use $parent.card instead of card when referencing the element in the transcluded item.

https://github.com/VegaFactor/angular-deckgrid

jzahka avatar Jun 29 '16 18:06 jzahka