|
1 | 1 | :marked
|
2 | 2 | # Angular 2 Glossary
|
3 |
| -#sg-tables.showcase.shadow-1 |
4 |
| - header.showcase-header |
5 |
| - p. |
6 |
| - <i>The difference between the right word |
7 |
| - and the almost right word is the difference between |
8 |
| - lightning and a lightning bug.</i> - Mark Twain |
9 |
| - |
10 |
| -:marked |
| 3 | + |
11 | 4 | Angular 2 has a vocabulary of its own.
|
12 | 5 | Most Angular 2 terms are everyday English words
|
13 | 6 | with a specific meaning within the Angular system.
|
|
35 | 28 | other HTML elements, attributes, properties, and components. They are usually represented
|
36 | 29 | as HTML attributes, hence the name.
|
37 | 30 |
|
38 |
| - The `ng-class` directive for adding and removing CSS class names is a good example of |
| 31 | + The `ngClass` directive for adding and removing CSS class names is a good example of |
39 | 32 | an Attribute Directive.
|
40 | 33 |
|
41 | 34 | .l-main-section
|
|
112 | 105 | * [Attribute Binding](./template-syntax.html#attribute-binding)
|
113 | 106 | * [Class Binding](./template-syntax.html#class-binding)
|
114 | 107 | * [Style Binding](./template-syntax.html#style-binding)
|
115 |
| - * [Two-way data binding with ng-model](./template-syntax.html#ng-model) |
| 108 | + * [Two-way data binding with ngModel](./template-syntax.html#ng-model) |
116 | 109 |
|
117 | 110 | Learn more about data binding in the
|
118 | 111 | [Template Syntax](./template-syntax.html#data-binding) chapter.
|
|
332 | 325 | managed by Angular as it creates, updates and destroys them.
|
333 | 326 |
|
334 | 327 | Developers can tap into key moments in that lifecycle by implementing
|
335 |
| - one or more of the "Lifecycle Hook" interfaces which are (in the order invoked): |
336 |
| - * `OnChanges` - called when [input](#input)/[output](#output) binding values change |
337 |
| - * `OnInit` - after the first `OnChanges` |
338 |
| - * `DoCheck` - developer's custom change detection |
339 |
| - * `AfterContentInit` - after component content initialized |
340 |
| - * `AfterContentChecked` - after every check of component content |
341 |
| - * `AfterViewInit` - after component's view(s) are initialized |
342 |
| - * `AfterViewChecked` - after every check of a component's view(s) |
343 |
| - * `OnDestroy` - just before the directive is destroyed. |
344 |
| -.alert.is-critical. |
345 |
| - These are the alpha names; |
346 |
| - we anticipate that they will be prefixed with <code>ng-</code> in the beta release. |
| 328 | + one or more of the "Lifecycle Hook" interfaces. |
| 329 | + |
| 330 | + Each interface has a single hook method whose name is the interface name prefixed with `ng`. |
| 331 | + For example, the `OnInit` interface has a hook method names `ngOnInit`. |
| 332 | + |
| 333 | + Angular calls these hook methods in the following order: |
| 334 | + * `ngOnChanges` - called when an [input](#input)/[output](#output) binding values change |
| 335 | + * `ngOnInit` - after the first `ngOnChanges` |
| 336 | + * `ngDoCheck` - developer's custom change detection |
| 337 | + * `ngAfterContentInit` - after component content initialized |
| 338 | + * `ngAfterContentChecked` - after every check of component content |
| 339 | + * `ngAfterViewInit` - after component's view(s) are initialized |
| 340 | + * `ngAfterViewChecked` - after every check of a component's view(s) |
| 341 | + * `ngOnDestroy` - just before the directive is destroyed. |
347 | 342 |
|
348 | 343 | .l-main-section
|
349 | 344 | <a id="M"></a>
|
|
418 | 413 | shape or re-shape HTML layout, typically by adding, removing, or manipulating
|
419 | 414 | elements and their children.
|
420 | 415 |
|
421 |
| - The `ng-if` "conditional element" directive and the `ng-for` "repeater" directive are |
| 416 | + The `ngIf` "conditional element" directive and the `ngFor` "repeater" directive are |
422 | 417 | good examples in this category.
|
423 | 418 |
|
424 | 419 | .l-main-section
|
|
0 commit comments