Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Directive Template vs TemplateUrl and Infinite digest #16

Open
leonardochaia opened this issue Mar 17, 2016 · 2 comments
Open

Directive Template vs TemplateUrl and Infinite digest #16

leonardochaia opened this issue Mar 17, 2016 · 2 comments

Comments

@leonardochaia
Copy link

Hi there, I was hoping someone could give me a heads up regarding this issue:
When using an inline template like in the provided plunker the tree directive works fine. But if I switch the inline template to an html file using templateUrl I start getting an infinite digest.

  • Example using an inline template: Plunker
  • Example using html template: Plunker (Throws Infinite Digest)

Can someone explain me why is this happening? Is there a workaround? My template is to complex for using it inline.

Thanks in advance,
Leo.

@sebastientromp
Copy link

Interested as well. Also, it looks like the issue occurs whether you use RecursionHelper or not (if you comment it out you still get the Infinite Digest)

@leonardochaia
Copy link
Author

Well, unfortunately angular-recursion did not solve our problem.
We ended up typing inline the recursive directive template, appending and compiling it manually on the directive's link function.
Definitively a really hacky way:

element.append(getRecursiveElement());
$compile(element.contents())(scope);

Leo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants