Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Functions getting called twice #1146

Closed
dushyantnakrani opened this Issue · 3 comments

3 participants

@dushyantnakrani

We were trying out angular.js and realized that functions are getting called twice. We even confirmed with your demo "To-do app" . Here we added "http://jsfiddle.net/Dfzec/" a console.log to the remaining() function. You will notice that the remaining() function is getting called twice every time.
Is this expected behavior or a possibility of a bug?

@btford
Owner

This is expected behavior. AngularJS does the call twice to ensure that the model has stabilized before rendering it.

@btford btford closed this
@reinwald

I did not get what you meant by "to ensure that the model has stabilized before rendering it." Is there any documentation that elaborates a bit more about the same?

@btford
Owner

Check out this section of the docs: http://docs.angularjs.org/guide/compiler

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.