Jimdo / angular-fontselect

A fontselect directive for AngularJS
MIT License
29 stars 9 forks source link

Error: [$rootScope:infdig] 10 $digest() iterations reached. Aborting! #36

Closed vapits closed 9 years ago

vapits commented 9 years ago

After connected with Google Fonts Api i get this error:

Error: [$rootScope:infdig] 10 $digest() iterations reached. Aborting!

Here\s my code:

<div class="sector typography">
    <h3>Typography</h3>
    <jd-fontselect></jd-fontselect>
</div>
Xiphe commented 9 years ago

Your code somehow got lost :)

Can you please provide more context? Do you have a call stack of the error? How does your apps config look? Is this reproducible in a plunker?

Xiphe commented 9 years ago

Edit, i just found your code.

I edited your issue to make it readable in the compiled state

Xiphe commented 9 years ago

Still no clue how to reproduce this. Feel free to reopen if this still is a problem.

Xiphe commented 9 years ago

@roylkng thanks for the stack trace. I'll look into that later on.

What really would help me is a plunker or at least some more details about the implementation.

roylkng commented 9 years ago

I simply used to check whether its fucntioning. But our product is made up of multiple controllers and we are using bower.My instinct says it has something to with how gulp build compiles the code.

On Tue, Nov 18, 2014 at 3:22 PM, Hannes Diercks notifications@github.com wrote:

Reopened #36 https://github.com/Jimdo/angular-fontselect/issues/36.

— Reply to this email directly or view it on GitHub https://github.com/Jimdo/angular-fontselect/issues/36#event-194747867.

Xiphe commented 9 years ago

just noticed that the documentation was outdated on this one

actually its

<jd-fontselect state="myStateObject"></jd-fontselect>

not sure if this is causing the issue, going to check that and update the docs.

Xiphe commented 9 years ago

when i change the markup of the demo to <jd-fontselect current="myStateObject"></jd-fontselect>, it's simply not functioning but i'm not getting any errors.

When you use use the dist/angular-fontselect(.min).js file, gulp should not mess around with it.

Im also having issues to parse the stacktrace you posted on #37. - seems to me as if your watcher is manipulating data which then triggers changes inside the font selection and they both create an infinite loop.

Im still unable to debug this since i have not jet found a way to reproduce the issue.

going to close this with the doc-update, please reopen any time.

Xiphe commented 9 years ago

just to be sure: the state object ist meant to be read-only :)