{ "currentEnvironment": "TypeScript", "version": { "raw": "2.4.5", "major": 2, "minor": 4, "patch": 6, "prerelease": [ "local" ], "build": "sha.a3e98d5", "version": "2.4.6-local", "codeName": "snapshot", "isSnapshot": true, "full": "2.4.6-local+sha.a3e98d5", "branch": "master", "commitSHA": "a3e98d5df3376b04c8c8b57b8aec05409d196074" }, "sections": [ { "name": "引导", "description": "

import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\n

\n", "items": [ { "syntax": "platformBrowserDynamic().bootstrapModule(AppModule);", "bold": [ "platformBrowserDynamic().bootstrapModule" ], "description": "

从一个指定的NgModule中使用根组件引导应用

\n" } ], "index": 0 }, { "name": "NgModules", "description": "

import { NgModule } from '@angular/core';\n

\n", "items": [ { "syntax": "@NgModule({ declarations: ..., imports: ...,\n exports: ..., providers: ..., bootstrap: ...})\nclass MyModule {}", "bold": [ "NgModule" ], "description": "

定义一个模块,其中包括组件、指令、管道和提供商。

\n" }, { "syntax": "declarations: [MyRedComponent, MyBlueComponent, MyDatePipe]", "bold": [ "declarations:" ], "description": "

一个数组,包括从属于当前模块的组件、指令和管道。

\n" }, { "syntax": "imports: [BrowserModule, SomeOtherModule]", "bold": [ "imports:" ], "description": "

一个数组,包括被导入到当前模块中的所有模块。来自被导入模块的declarations也同样对当前模块有效。

\n" }, { "syntax": "exports: [MyRedComponent, MyDatePipe]", "bold": [ "exports:" ], "description": "

一个数组,包括对导入当前模块的模块可见的组件、指令、管道。

\n" }, { "syntax": "providers: [MyService, { provide: ... }]", "bold": [ "providers:" ], "description": "

一个数组,包括在对前模块及导入当前模块的模块中的内容物(组件、指令、管道、提供商等)可见的依赖注入提供商。

\n" }, { "syntax": "bootstrap: [MyAppComponent]", "bold": [ "bootstrap:" ], "description": "

一个数组,包括由当前模块引导时应该引导的组件

\n" } ], "index": 1 }, { "name": "模板语法", "description": "", "items": [ { "syntax": "", "bold": [ "[value]" ], "description": "

把属性value绑定到表达式firstName的结果。

\n" }, { "syntax": "
", "bold": [ "[attr.role]" ], "description": "

role这个Attribute绑定到表达式 myAriaRole的结果。

\n" }, { "syntax": "
", "bold": [ "[class.extra-sparkle]" ], "description": "

把元素是否出现CSS类extra-sparkle,绑定到一个表达式isDelightful的结果是否为真。

\n" }, { "syntax": "
", "bold": [ "[style.width.px]" ], "description": "

把样式的width属性绑定到表达式mySize的结果,以px为单位。这个单位是可选的。

\n" }, { "syntax": "