W
W
whatislove2016-02-18 18:29:09
Angular
whatislove, 2016-02-18 18:29:09

Why does AngularJs re-execute code?

On the site, all the code in the controllers began to be executed twice, before this was not the case.
A simple example: we write console.log('hello word'), when the site loads, the message in the console displays twice.
Why can this be?!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
MNB, 2016-02-18
@MNB

do you have a router? Which?

L
lega, 2016-02-18
@lega

Angular itself works once, and the second time a crookedly written directive can work, which compiles / binds the DOM without notifying the kernel about it.
You also need to check if bootstrap is called twice.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question