什么是Angular平台浏览器? [英] What is Angular platform-browser?

查看:97
本文介绍了什么是Angular平台浏览器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是Angular 2的新手.我已经在每个项目中看到有一个名为platform-browser的插件.

I am new to Angular 2. I have seen in every project there is plugin called platform-browser.

"@angular/platform-browser": "2.0.0-rc.4",
"@angular/platform-browser-dynamic": "2.0.0-rc.4",

我真的不知道它的用途是什么.有人可以请我解释一下 -platform-browser的用途是什么? -如果不使用platform-browser会出现什么问题?

I don't really know what is the usage of it. Someone can please explain me - What is the usage of platform-browser? - What is the problem if we not use platform-browser?

推荐答案

您的Angular应用程序可以通过多种方式启动,但是当您在浏览器上运行时,您可以通过一种特定的方式来引导应用程序,该方法在.

Your Angular application can start off in many ways, but when you run on the browser you have a specific way of bootstrapping the application and that is defined in @angular/platform-browser-dynamic.

简而言之,这些程序包包含角度功能,这些功能使在浏览器中启动和运行Angular应用成为可能. Bootstrapping是必不可少的,也是这些功能之一.

In short these packages contain angular features which make getting an Angular app up and running possible in the browser. Bootstrapping is essential and one of those features.

当您的目标不是开发要在浏览器上运行的应用程序时,可以忽略此设置,否则这是必不可少的.

You can omit this when your target is not to develop the app to run on browser otherwise it is essential.

  • Platform-browser-dynamic
  • Platform-browser

这篇关于什么是Angular平台浏览器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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