54
54
:marked
55
55
In practice, a synonym for [Decoration](#decorator).
56
56
57
+ a#attribute-directive
58
+ a#attribute-directives
57
59
:marked
58
- ## Attribute directive
60
+ ## Attribute directives
59
61
.l-sub-section
60
62
:marked
61
63
A category of [directive](#directive) that can listen to and modify the behavior of
64
66
65
67
A good example of an attribute directive is the `ngClass` directive for adding and removing CSS class names.
66
68
69
+ Learn about them in the [_Attribute Directives_](!{docsLatest}/guide/attribute-directives.html) guide.
70
+
67
71
.l-main-section #B
68
72
69
73
+ ifDocsFor('ts|js' )
@@ -141,6 +145,7 @@ a#aot
141
145
This form is also known as **lower camel case**, to distinguish it from **upper camel case**, which is [PascalCase](#pascalcase).
142
146
When you see "camelCase" in this documentation it always means *lower camel case*.
143
147
148
+ a#component
144
149
:marked
145
150
## Component
146
151
.l-sub-section
@@ -245,7 +250,7 @@ a#aot
245
250
that "B" is a dependency of "A".
246
251
247
252
You can ask a "dependency injection system" to create "A"
248
- for us and handle all the dependencies.
253
+ and it will handle all of "A"s dependencies.
249
254
If "A" needs "B" and "B" needs "C", the system resolves that chain of dependencies
250
255
and returns a fully prepared instance of "A".
251
256
@@ -276,18 +281,20 @@ a#aot
276
281
Registering providers is a critical preparatory step.
277
282
278
283
Angular registers some of its own providers with every injector.
279
- We can register our own providers.
284
+ You can register your own providers.
280
285
281
286
Read more in the [Dependency Injection](!{docsLatest}/guide/dependency-injection.html) page.
287
+
288
+ a#directive
289
+ a#directives
282
290
:marked
283
291
## Directive
284
292
.l-sub-section
285
293
:marked
286
294
An Angular class responsible for creating, reshaping, and interacting with HTML elements
287
295
in the browser DOM. Directives are Angular's most fundamental feature.
288
296
289
- A Directive is almost always associated with an HTML element or attribute.
290
- We often refer to such an element or attribute as the directive itself.
297
+ A directive is almost always associated with an HTML element or attribute.
291
298
When Angular finds a directive in an HTML template,
292
299
it creates the matching directive class instance
293
300
and gives the instance control over that portion of the browser DOM.
@@ -300,15 +307,15 @@ a#aot
300
307
Directives fall into one of three categories:
301
308
302
309
1. [Components](#component) that combine application logic with an HTML template to
303
- render application [views]. Components are usually represented as HTML elements.
310
+ render application [views](#view) . Components are usually represented as HTML elements.
304
311
They are the building blocks of an Angular application and the
305
312
developer can expect to write a lot of them.
306
313
307
- 1. [Attribute directives](#attribute-directive ) that can listen to and modify the behavior of
314
+ 1. [Attribute directives](#attribute-directives ) that can listen to and modify the behavior of
308
315
other HTML elements, attributes, properties, and components. They are usually represented
309
316
as HTML attributes, hence the name.
310
317
311
- 1. [Structural directives](#structural-directive ), a directive responsible for
318
+ 1. [Structural directives](#structural-directives ), a directive responsible for
312
319
shaping or reshaping HTML layout, typically by adding, removing, or manipulating
313
320
elements and their children.
314
321
@@ -630,21 +637,24 @@ a#snake-case
630
637
Applications often require services such as a hero data service or a logging service.
631
638
632
639
A service is a class with a focused purpose.
633
- We often create a service to implement features that are
640
+ You often create a service to implement features that are
634
641
independent from any specific view,
635
642
provide shared data or logic across components, or encapsulate external interactions.
636
643
637
644
For more information, see the [Services](!{docsLatest}/tutorial/toh-pt4.html) page of the [Tour of Heroes](!{docsLatest}/tutorial/) tutorial.
638
645
646
+ a#structural-directive
647
+ a#structural-directives
639
648
:marked
640
- ## Structural directive
649
+ ## Structural directives
641
650
.l-sub-section
642
651
:marked
643
652
A category of [directive](#directive) that can
644
653
shape or reshape HTML layout, typically by adding, removing, or manipulating
645
- elements and their children; for example, the `ngIf` "conditional element" directive and the `ngFor` "repeater" directive.
654
+ elements and their children.
655
+ Examples include the `*ngIf` _conditional_ directive and the `*ngFor` _repeater_ directive.
646
656
647
- Read more in the [Structural Directives ](!{docsLatest}/guide/structural-directives.html) page .
657
+ Read more in the [_Structural Directives_ ](!{docsLatest}/guide/structural-directives.html) guide .
648
658
649
659
.l-main-section #T
650
660
:marked
@@ -699,8 +709,8 @@ a#snake-case
699
709
A version of JavaScript that supports most [ECMAScript 2015](#es2015)
700
710
language features such as [decorators](#decorator).
701
711
702
- TypeScript is also noteable for its optional typing system, which gives
703
- us compile-time type checking and strong tooling support (for example, "intellisense",
712
+ TypeScript is also noteable for its optional typing system, which enables
713
+ compile-time type checking and strong tooling support (for example, "intellisense",
704
714
code completion, refactoring, and intelligent search). Many code editors
705
715
and IDEs support TypeScript either natively or with plugins.
706
716
0 commit comments