Skip to content

Commit a120d7f

Browse files
committed
docs: follow/side effects/taught typos
1 parent 814f3d0 commit a120d7f

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

modules/core/docs/01_templates.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ about the template runtime characteristics.
2121
## Summary
2222

2323
Below is a summary of the kinds of syntaxes which Angular templating supports. The syntaxes are explained in more
24-
detail in fallowing sections.
24+
detail in following sections.
2525

2626
<table>
2727
<thead>
@@ -408,7 +408,7 @@ which allows us to further shorten the text.
408408
</ul>
409409
```
410410

411-
We can also optionaly use `var` instead of `#` and add `:` to `ng-repeat` which creates the fallowing recomended
411+
We can also optionaly use `var` instead of `#` and add `:` to `ng-repeat` which creates the following recomended
412412
microsyntax for `ng-repeat`.
413413

414414
```
@@ -418,7 +418,7 @@ microsyntax for `ng-repeat`.
418418
```
419419

420420
The format is intentionally defined freely, so that developers of directives can build expressive microsyntax for
421-
their directives. Fallowing describes a more formal definition.
421+
their directives. Following describes a more formal definition.
422422

423423
```
424424
expression: ... // as defined in Expressions section
@@ -518,7 +518,7 @@ have different semantics.
518518
### Expressions
519519

520520
Expressions can be used to bind to a properties only. Expressions represent how data should be projected to the View.
521-
Expressions should not have any sideeffects and should be idempotent. Examples of where expressions can be used in
521+
Expressions should not have any side effects and should be idempotent. Examples of where expressions can be used in
522522
Angular are:
523523
```
524524
<div title="{{expression}}">{{expression}}</div>
@@ -537,7 +537,7 @@ langugage, binding expressions behave differently in following ways:
537537
This is done to allow early detection of errors in the templates.
538538
* *Safe dereference*: Expressions `user.name` where `user` is null will throw `NullPointerException` in the langugage.
539539
In contrast Angular will silently ignore `null` on `user`. This is done because Views often have to wait for the data
540-
to arrive from the backend and many fields will be null until the data arrives. Safe dereference so cammon in the
540+
to arrive from the backend and many fields will be `null` until the data arrives. Safe dereference is so common in the
541541
Views, that we have made it the default.
542542
* *Single expression*: An expression must be a single statemnet. (i.e. no `;`)
543543
* *No assignments*: Binding expressions can not contain assignments.
@@ -572,16 +572,16 @@ Examples of where statments can be used in Angular are:
572572
<div on-click="statments">...</div>
573573
```
574574

575-
Statements are similar to statments in the langugage in which you are writing your application. (i.e.
576-
statments fallow JS syntax and semantics in JS and Dart syntax and semantics in Dart). Unlike statments in the
575+
Statements are similar to statments in the langugage in which you are writing your application. (i.e.
576+
statments follow JS syntax and semantics in JS and Dart syntax and semantics in Dart). Unlike statments in the
577577
langugage, binding expressions behave differently in following ways:
578578

579-
* *Unsafe dereference*: Expressions `user.verify()` where `user` is null will throw `NullPointerException` in the
579+
* *Unsafe dereference*: Expressions `user.verify()` where `user` is `null` will throw `NullPointerException` in the
580580
langugage as well as in statments. (In contrast to Safe dereference in Angular expressions.) While angular protects
581581
you from null dereferencing in expressions due to lazy loading of data, no such protection is required for statments,
582582
and doing so would make it harder to detect typos in statements.
583583
* *Multiple statements OK*: Statements can be composed from more than one statemnet. (i.e. no `doA(); doB()`)
584-
* *Assignments OK*: Event bindings can have sideeffects and hence assignments are allowed.
584+
* *Assignments OK*: Event bindings can have side effects and hence assignments are allowed.
585585
* *No keywords*: Statements can not contain keywords such as: `var`, `if`, and so on.
586586
* *No Formatters*: Angular statements can not contain formatters. (Formatters are only usefull for data binding)
587587

modules/core/docs/02_directives.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ Example of usage:
8888

8989
```<span tooltip="Tooltip text goes here.">Some text here.</span>```
9090

91-
The developer of an applacation can now freely use the `tooltip` attribute wherever the behavior is needed. The code above has tought the browser a new reusable and declarative bahavior.
91+
The developer of an applacation can now freely use the `tooltip` attribute wherever the behavior is needed. The code above has taught the browser a new reusable and declarative bahavior.
9292

9393
Notice that databinding will work with this decorator with no further effort as show below.
9494

@@ -214,7 +214,7 @@ Dependency Injection (DI) is a key aspect of directives. DI allows directives to
214214

215215
When Angular directives are instantiated, the directive can ask for other related directives to be injected into it. By assembing the directives in different order and subtypes the application behavior can be controlled. A good mental model is that DOM structure controlles the directive instantiation graph.
216216

217-
Directive instantiation is triggered by the directive CSS selector matching the DOM structure. The directive in its constructor can ask for other directives or application services. When asking for directives the dependency is locating by fallowing the DOM hieranchy and if not found using the application level injector.
217+
Directive instantiation is triggered by the directive CSS selector matching the DOM structure. The directive in its constructor can ask for other directives or application services. When asking for directives the dependency is locating by following the DOM hieranchy and if not found using the application level injector.
218218

219219
To better understand the kinds of injections which are supported in Angular we have broken them down into use case examples.
220220

@@ -251,7 +251,7 @@ class House { |
251251
252252
```
253253

254-
Assume fallowing DOM structure for `my_app.html`:
254+
Assume the following DOM structure for `my_app.html`:
255255
```
256256
<div house> | The house attribute triggers the creation of House directive.
257257
</div> | This is equivalent to:
@@ -261,7 +261,7 @@ Assume fallowing DOM structure for `my_app.html`:
261261

262262
### Injecting other Directives
263263

264-
Injecting other directives into directives fallows similar mechanism as injecting services, but with added constraint of visibility governed by DOM structure.
264+
Injecting other directives into directives follows a similar mechanism as injecting services, but with added constraint of visibility governed by DOM structure.
265265

266266
There are five kinds of visibilities:
267267

@@ -316,7 +316,7 @@ class Primary { |
316316
} |
317317
```
318318

319-
Assume fallowing DOM structure for `my_app.html`:
319+
Assume the following DOM structure for `my_app.html`:
320320
```
321321
<form> |
322322
<div> |

0 commit comments

Comments
 (0)