Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I've been getting started with Angular JS and using it as a front-end to integrate with a Play Framework POC. I've already worked through the tutorial.

I cloned my front end from the seed project on github. It has an app/index.html (which I'm using as my main page) and an app/index-async.html. What is the point of the latter? Is it really necessary?

question from:https://stackoverflow.com/questions/11566087/in-angular-seed-project-what-is-point-of-index-async-html

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
88 views
Welcome To Ask or Share your Answers For Others

1 Answer

The two files are interchangeable, and you can use either one to build your application. index-async.html loads scripts asynchronously, which might give you a faster bootstrap time. index.html loads scripts synchronously, which is often a bit slower, but the intention is that the code is easier to understand for someone learning to use the framework.

To read more about asynchronous bootstrapping, check out the docs here: http://docs.angularjs.org/guide/bootstrap


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...