引导功能在Angular中有什么作用 [英] What does bootstrap function do in Angular

查看:74
本文介绍了引导功能在Angular中有什么作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对前端框架非常陌生,并且正在学习Angular2.在本教程中,它告诉您包括行bootstrap(AppComponent).该引导程序功能是做什么的?仅仅是启动应用程序的原因吗?我猜想它与 UI框架.

I'm very new to frontend frameworks and I am learning Angular 2. In the tutorial, it tells you to include the line bootstrap(AppComponent). What does this bootstrap function do? Is it simply what starts the app? I'm guessing it has nothing to do with the twitter-bootstrap UI framework.

推荐答案

来自文档:

您可以通过bootstrap()方法显式指定要用作应用程序根组件的组件来实例化Angular应用程序.

You instantiate an Angular application by explicitly specifying a component to use as the root component for your application via the bootstrap() method.

是的,它只是启动了应用程序.

So yes, it just starts the application.

这篇关于引导功能在Angular中有什么作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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