6

I have a setInterval() function in a component class that fires off every 1/10 of a second. All it does is update a d3 graph and does not touch any angular bindings.

By default setInterval() triggers the change detection in angular from the root node.

Is there a way to run the setInterval() function without triggering any change detection?

I don't need the rest of the app to update itself since I know this only affects the graph and d3 is the only one responsible for the updating the graph.

1 Answer 1

3

You have to run it outside of angular. Take a look at this answer to a similar question.

https://stackoverflow.com/a/39626378/1710501

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.