reallyseth / angular-adaptive

This module will dynamically include a view based on the width of the screen. You can set the breakpoints in the html.
19 stars 1 forks source link

Multiple directives asking for transclusion #1

Open simmo1210 opened 10 years ago

simmo1210 commented 10 years ago

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 commented 10 years ago

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.

reallyseth commented 10 years ago

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

simmo1210 commented 10 years ago

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.