parent
b2cae850d8
commit
6e3039f4ac
|
@ -1,13 +1,6 @@
|
||||||
:marked
|
:marked
|
||||||
# Angular 2 Glossary
|
# Angular 2 Glossary
|
||||||
#sg-tables.showcase.shadow-1
|
|
||||||
header.showcase-header
|
|
||||||
p.
|
|
||||||
<i>The difference between the right word
|
|
||||||
and the almost right word is the difference between
|
|
||||||
lightning and a lightning bug.</i> - Mark Twain
|
|
||||||
|
|
||||||
:marked
|
|
||||||
Angular 2 has a vocabulary of its own.
|
Angular 2 has a vocabulary of its own.
|
||||||
Most Angular 2 terms are everyday English words
|
Most Angular 2 terms are everyday English words
|
||||||
with a specific meaning within the Angular system.
|
with a specific meaning within the Angular system.
|
||||||
|
@ -35,7 +28,7 @@
|
||||||
other HTML elements, attributes, properties, and components. They are usually represented
|
other HTML elements, attributes, properties, and components. They are usually represented
|
||||||
as HTML attributes, hence the name.
|
as HTML attributes, hence the name.
|
||||||
|
|
||||||
The `ng-class` directive for adding and removing CSS class names is a good example of
|
The `ngClass` directive for adding and removing CSS class names is a good example of
|
||||||
an Attribute Directive.
|
an Attribute Directive.
|
||||||
|
|
||||||
.l-main-section
|
.l-main-section
|
||||||
|
@ -112,7 +105,7 @@
|
||||||
* [Attribute Binding](./template-syntax.html#attribute-binding)
|
* [Attribute Binding](./template-syntax.html#attribute-binding)
|
||||||
* [Class Binding](./template-syntax.html#class-binding)
|
* [Class Binding](./template-syntax.html#class-binding)
|
||||||
* [Style Binding](./template-syntax.html#style-binding)
|
* [Style Binding](./template-syntax.html#style-binding)
|
||||||
* [Two-way data binding with ng-model](./template-syntax.html#ng-model)
|
* [Two-way data binding with ngModel](./template-syntax.html#ng-model)
|
||||||
|
|
||||||
Learn more about data binding in the
|
Learn more about data binding in the
|
||||||
[Template Syntax](./template-syntax.html#data-binding) chapter.
|
[Template Syntax](./template-syntax.html#data-binding) chapter.
|
||||||
|
@ -332,18 +325,20 @@
|
||||||
managed by Angular as it creates, updates and destroys them.
|
managed by Angular as it creates, updates and destroys them.
|
||||||
|
|
||||||
Developers can tap into key moments in that lifecycle by implementing
|
Developers can tap into key moments in that lifecycle by implementing
|
||||||
one or more of the "Lifecycle Hook" interfaces which are (in the order invoked):
|
one or more of the "Lifecycle Hook" interfaces.
|
||||||
* `OnChanges` - called when [input](#input)/[output](#output) binding values change
|
|
||||||
* `OnInit` - after the first `OnChanges`
|
Each interface has a single hook method whose name is the interface name prefixed with `ng`.
|
||||||
* `DoCheck` - developer's custom change detection
|
For example, the `OnInit` interface has a hook method names `ngOnInit`.
|
||||||
* `AfterContentInit` - after component content initialized
|
|
||||||
* `AfterContentChecked` - after every check of component content
|
Angular calls these hook methods in the following order:
|
||||||
* `AfterViewInit` - after component's view(s) are initialized
|
* `ngOnChanges` - called when an [input](#input)/[output](#output) binding values change
|
||||||
* `AfterViewChecked` - after every check of a component's view(s)
|
* `ngOnInit` - after the first `ngOnChanges`
|
||||||
* `OnDestroy` - just before the directive is destroyed.
|
* `ngDoCheck` - developer's custom change detection
|
||||||
.alert.is-critical.
|
* `ngAfterContentInit` - after component content initialized
|
||||||
These are the alpha names;
|
* `ngAfterContentChecked` - after every check of component content
|
||||||
we anticipate that they will be prefixed with <code>ng-</code> in the beta release.
|
* `ngAfterViewInit` - after component's view(s) are initialized
|
||||||
|
* `ngAfterViewChecked` - after every check of a component's view(s)
|
||||||
|
* `ngOnDestroy` - just before the directive is destroyed.
|
||||||
|
|
||||||
.l-main-section
|
.l-main-section
|
||||||
<a id="M"></a>
|
<a id="M"></a>
|
||||||
|
@ -418,7 +413,7 @@
|
||||||
shape or re-shape HTML layout, typically by adding, removing, or manipulating
|
shape or re-shape HTML layout, typically by adding, removing, or manipulating
|
||||||
elements and their children.
|
elements and their children.
|
||||||
|
|
||||||
The `ng-if` "conditional element" directive and the `ng-for` "repeater" directive are
|
The `ngIf` "conditional element" directive and the `ngFor` "repeater" directive are
|
||||||
good examples in this category.
|
good examples in this category.
|
||||||
|
|
||||||
.l-main-section
|
.l-main-section
|
||||||
|
|
Loading…
Reference in New Issue