File tree Expand file tree Collapse file tree 3 files changed +36
-9
lines changed
modules/angular2/src/core Expand file tree Collapse file tree 3 files changed +36
-9
lines changed Original file line number Diff line number Diff line change @@ -445,18 +445,17 @@ export class Directive extends Injectable {
445445}
446446
447447/**
448- * Declare template views for an Angular application.
448+ * Declare reusable UI building blocks for an application.
449449 *
450- * Each angular component requires a single `@Component` and at least one `@Template` annotation. This allows Angular to
451- * encapsulate state information and templates. These form the fundamental reusable building blocks for developing an
452- * application. There can only be one component per DOM element.
450+ * Each angular component requires a single `@Component` and at least one `@Template` annotation. The @Component
451+ * annotation specifies when a component is instantiated, and which properties and events it binds to.
453452 *
454453 * When a component is instantiated, Angular
455454 * - creates a shadow DOM for the component.
456455 * - loads the selected template into the shadow DOM.
457456 * - creates a child [Injector] which is configured with the [Component.services].
458457 *
459- * All template expressions and statments are then evaluted against the component instance.
458+ * All template expressions and statements are then evaluated against the component instance.
460459 *
461460 * For details on the `@Template` annotation, see [Template].
462461 *
Original file line number Diff line number Diff line change 11import { ABSTRACT , CONST , Type } from 'angular2/src/facade/lang' ;
22
33/**
4+ * Declare the available HTML templates for an application.
5+ *
6+ * Each angular component requires a single `@Component` and at least one `@Template` annotation. The @Template
7+ * annotation specifies the HTML template to use, and lists the directives that are active within the template.
8+ *
9+ * When a component is instantiated, the template is loaded into the component's shadow root, and the
10+ * expressions and statements in the template are evaluated against the component.
11+ *
12+ * For details on the `@Component` annotation, see [Component].
13+ *
14+ * ## Example
15+ *
16+ * ```
17+ * @Component ({
18+ * selector: 'greet'
19+ * })
20+ * @Template ({
21+ * inline: 'Hello {{name}}!'
22+ * })
23+ * class Greet {
24+ * name: string;
25+ *
26+ * constructor() {
27+ * this.name = 'World';
28+ * }
29+ * }
30+ * ```
31+ *
432 * @publicModule angular2/annotations
533 */
634export class Template {
Original file line number Diff line number Diff line change @@ -148,8 +148,8 @@ function _createVmZone(givenReporter:Function): VmTurnZone {
148148 * An application is bootstrapped inside an existing browser DOM, typically `index.html`. Unlike Angular 1, Angular 2
149149 * does not compile/process bindings in `index.html`. This is mainly for security reasons, as well as architectural
150150 * changes in Angular 2. This means that `index.html` can safely be processed using server-side technologies such as
151- * bindings. (which may use double-curly `{{ syntax }}` without collision from Angular 2 component double-curly
152- * `{{ syntax }}`.)
151+ * bindings. Bindings can thus use double-curly `{{ syntax }}` without collision from Angular 2 component double-curly
152+ * `{{ syntax }}`.
153153 *
154154 * We can use this script code:
155155 *
@@ -204,8 +204,8 @@ function _createVmZone(givenReporter:Function): VmTurnZone {
204204 *
205205 * If you need to bootstrap multiple applications that share common data, the applications must share a common
206206 * change detection and zone. To do that, create a meta-component that lists the application components in its template.
207- * By only invoking the `bootstrap()` method once, with the meta-component as its argument, you ensure that only a single
208- * change detection zone is created and therefore data can be shared across the applications.
207+ * By only invoking the `bootstrap()` method once, with the meta-component as its argument, you ensure that only a
208+ * single change detection zone is created and therefore data can be shared across the applications.
209209 *
210210 *
211211 * ## Primordial Injector
You can’t perform that action at this time.
0 commit comments