Functions getting called twice #1146

Closed
dushyantnakrani opened this Issue Jul 16, 2012 · 3 comments

Comments

Projects
None yet
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

This comment has been minimized.

Show comment Hide comment
@btford

btford Jul 16, 2012

Contributor

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

Contributor

btford commented Jul 16, 2012

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

@btford btford closed this Jul 16, 2012

@reinwald

This comment has been minimized.

Show comment Hide comment
@reinwald

reinwald Jul 16, 2012

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?

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

This comment has been minimized.

Show comment Hide comment
@btford

btford Jul 16, 2012

Contributor

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

Contributor

btford commented Jul 16, 2012

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