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

Multiple directives asking for transclusion

Open simmo1210 opened this issue 10 years ago • 3 comments

Hi,

I'm trying to use your directive but getting the following error:

Error: [$compile:multidir] Multiple directives [adapt, ngInclude] asking for transclusion on:

I'm using angularjs version 1.2.14. Here's my markup:

<div class="item" data-adapt="header.html"></div>

and here's my global settings:

''' .value('adaptive.config', { breakPoints: [{ "postfix": "m", "width": 540 }, { "postfix": "d", "width": 768 }] }) '''

Any ideas? I'll carry on trying to fix and submit a pull if I get it.

Cheers,

Mike

simmo1210 avatar Apr 07 '14 16:04 simmo1210

Ok I think this is happening because the directive template is adding the ngInclude directive to the top level element. If you nest the ngInclude div within the top level div it seems to work ok. Let me know if you want me to fix it. Cheers.

simmo1210 avatar Apr 08 '14 12:04 simmo1210

Thanks for figuring that out! If you could fix and send a pull request, I'll merge it in.

reallyseth avatar Apr 10 '14 13:04 reallyseth

Done – this is the first time i’ve used GitHub so apologies if I’ve done anything wrong git-wise :)

From: reallyseth Sent: Thursday, April 10, 2014 2:46 PM To: reallyseth/angular-adaptive Cc: simmo1210 Subject: Re: [angular-adaptive] Multiple directives asking for transclusion (#1)

Thanks for figuring that out! If you could fix and send a pull request, I'll merge it in.

— Reply to this email directly or view it on GitHub.

simmo1210 avatar Apr 10 '14 14:04 simmo1210