A way to initialize and launch an app or system.
In Angular, an app’s root NgModule (AppModule) has a bootstrap property that identifies the app’s top-level components.

例子:

import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';@NgModule({declarations: [AppComponent],imports: [BrowserModule,AppRoutingModule],providers: [],bootstrap: [AppComponent]
})
export class AppModule { }

其中bootstrap属性的值AppComponent来自文件app.component.ts:

During the bootstrap process, Angular creates and inserts these components into the index.html host web page.

index.html的内容:

<!doctype html>
<html lang="en">
<head><meta charset="utf-8"><title>MyFirstProject</title><base href="/"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="icon" type="image/x-icon" href="favicon.ico">
</head>
<body><app-root></app-root>
</body>
</html>

这个app-root的标签:

定义在app.component.ts的Component selector里:

要获取更多Jerry的原创文章,请关注公众号"汪子熙":

Angular bootstrap的一个例子相关推荐

  1. Angular component的一个例子

    官网:https://angular.io/guide/architecture-components Before a view is displayed, Angular evaluates th ...

  2. Webpack入门——使用Webpack打包Angular项目的一个例子

    (一)什么是Webpack Webpack是一个前端的模块管理工具(module bundler),以下是webpack的官网:http://webpack.github.io/,一进入官网可以看到下 ...

  3. Angular NgTemplateOutlet的一个例子

    NgTemplateOutlet:Inserts an embedded view from a prepared TemplateRef. 语法: <ng-container *ngTempl ...

  4. SAP Spartacus 服务器端 nodejs 应用里渲染 Angular Component 的一个例子

    触发方式:将下列 url 粘贴到浏览器地址栏里,回车: http://localhost:4000/Open-Catalogue/Cameras/Hand-held-Camcorders/c/584 ...

  5. SAP Spartacus 中,Angular <ng-container>使用的一个例子

    Angular官网里对ng-container的介绍: The Angular is a grouping element that doesn't interfere with styles or ...

  6. Angular 自定义 structural 指令的一个例子

    The <ng-container> is a syntax element recognized by the Angular parser. It's not a directive, ...

  7. Phonegap集成angular/bootstrap/animate.css教程

    1,phonegap集成angular 按照这篇文档的步骤:http://projectpoppycock.com/angularjs-phonegap-and-angular-seed-lets-g ...

  8. AngularJs angular.bind、angular.bootstrap、angular.copy

    angular.bind 返回一个调用self的函数fn(self代表fn里的this).可以给fn提供参数args(*).这个功能也被称为局部操作,以区别功能. 格式:angular.bind(se ...

  9. TypeScript 类装饰器的一个例子和使用单步调试搞清楚其运行原理

    官方文档 类装饰器的定义如下: type ClassDecorator = <TFunction extends Function>(target: TFunction) => TF ...

最新文章

  1. Spring源码解析 - AbstractBeanFactory 实现接口与父类分析
  2. LGB + KFold 代码 (1)
  3. 【机器学习基础】Softmax与Sigmoid你还不知道存在这些联系?
  4. 【Java数据库】SQL时间类型Date Time Timestamp区别、插入/取出指定时间段的数据
  5. scala中akka actor例子
  6. 3w最简单led灯电路图_Mixly 第19课 光感应灯——光敏电阻使用
  7. 1034 有理数四则运算 (20 分)java
  8. (C/C++) Link List - C++ 版本
  9. hibernate 高并发下遇到的大坑
  10. axure网页预览_解决Axure发布分享预览的3个方法
  11. java毕设项目——图书借阅管理系统(附源码课件)
  12. r语言平均值显著性检验_用R语言解读统计检验-F检验
  13. 串操作指令---movs,stos,rep
  14. Dnsmasq+ipset+iptables基于域名的流量管理
  15. 计算机教室云教学反思,《云》音乐教学反思
  16. 揭秘:一线互联网薪资曝光,看看你的价值,有没有被低估?
  17. Unity限制旋转角度
  18. java旧版下载地址_Java下载 - 最新版、历史版本的官方下载地址
  19. 基于JSP的员工绩效考核系统
  20. 鹅得了腺病毒用什么药治疗小鹅摇头晃脑不吃食怎么办

热门文章

  1. C#生成CHM文件(中级篇)
  2. Linux中Postfix邮件发送配置(三)
  3. D-query SPOJ - DQUERY (主席树)
  4. 【GISER Painter】矢量切片(Vector tile)
  5. 大公司青睐的50款开源工具
  6. POJ 1155 TELE 背包型树形DP 经典题
  7. 数据库工具phpstudy
  8. Swift基础之方法实战
  9. 性能测试工具比较:LoadRunner vs JMeter - 测试结果数据比较
  10. 前端请求,后台http 连接输出流交给ServeletResponse 下载文件