在角种子工程,什么是指数async.html点? [英] In Angular Seed project, what is point of index-async.html?

查看:108
本文介绍了在角种子工程,什么是指数async.html点?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经开始使用JS角,并用它作为一个前端整合
使用Play框架POC。我已经通过本教程的工作。

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.

我克隆我的前端从 github上种子工程。它有一个应用程序/ index.html的
(这我使用作为我的主网​​页)和应用程序/索引async.html 。什么是
后者的意义呢?是不是真的有必要吗?

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?

推荐答案

这两个文件是可以互换的,你可以使用其中之一来构建应用程序。 索引async.html 加载脚本不同步,这可能给你一个更快的引导时间。 index.html的加载脚本同步,这往往是有点慢,但用意是,code是比较容易理解的人学习使用的框架。

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.

要了解更多有关异步引导,在这里检查出文档: http://docs.angularjs.org/guide/bootstrap

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

这篇关于在角种子工程,什么是指数async.html点?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆