S
S
Stopy2015-09-20 14:32:10
JavaScript
Stopy, 2015-09-20 14:32:10

Why doesn't Angular work correctly?

I wrote the simplest server on Node.js / Express, which simply gives index.html, the page loads, but instead of the template and data, this is how I see my tag, which is described in the directive. By the way, if you refresh the page, then 1 out of 10 times it works correctly, but it’s not possible to work like that. There are no errors in the console, I tried to load angular from cdn and from a local file, I inserted it at the beginning and at the end of the file, the result is the same. What's the matter?
556ef8c2b7044842bdcc8d32722f4948.jpg
******************************************************* ****************************************************
d81fd98828044e58a40612e47343c383.jpg
_ **************
And here is 1 out of 10 cases
c6e568a59b474cd39420a2d8b1f51174.jpg

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2015-09-20
@OneFive

Because scripts are executed before the body of the pages is loaded, move the script blocks to the end of the body.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question