Skip to content
This repository was archived by the owner on Dec 4, 2017. It is now read-only.

Commit af08c61

Browse files
committed
fix capitalization and grammar
1 parent b0a6608 commit af08c61

File tree

1 file changed

+57
-57
lines changed

1 file changed

+57
-57
lines changed

public/docs/js/latest/cookbook/ts-to-js.jade

Lines changed: 57 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ a(id="from-ts")
3636
:marked
3737
## From TS to ES6 to ES5
3838

39-
Since TypeScript is a superset of ES6 Javascript, and ES6 itself is a superset of ES5, the
39+
Since TypeScript is a superset of ES6 JavaScript, and ES6 itself is a superset of ES5, the
4040
transformation of Typescript code all the way to ES5 javascript can be seen as "shedding"
4141
features.
4242

@@ -47,12 +47,12 @@ a(id="from-ts")
4747
such as `public` and `private`.
4848
The exception is type annotations used for dependency injection, which can be kept.
4949

50-
Going from ES6 with decorators to plan ES6 Javascript we lose all
50+
Going from ES6 with decorators to plain ES6 JavaScript we lose all
5151
[decorators](https://www.typescriptlang.org/docs/handbook/decorators.html)
52-
the remaining type annotations.
52+
and the remaining type annotations.
5353
We also lose class properties, which now have to be declared in the class constructor.
5454

55-
Finally, in the transition from ES6 to ES5 Javascript the main missing features are `import`
55+
Finally, in the transition from ES6 to ES5 JavaScript the main missing features are `import`
5656
statements and `class` declarations.
5757

5858
For ES6 transpilation we recommend using a similar setup as our TypeScript quickstart,
@@ -67,7 +67,7 @@ a(id="modularity")
6767

6868
### Importing Angular Code
6969

70-
In TypeScript and ES6 Javascript, Angular classes, functions, and other members are imported
70+
In TypeScript and ES6 JavaScript, Angular classes, functions, and other members are imported
7171
with ES6 `import` statements.
7272

7373
In ES5 JavaScript code, when using [the Angular packages](../glossary.html#!#scoped-package),
@@ -86,21 +86,21 @@ a(id="modularity")
8686
ng2import
8787
`,`
8888
Typescript,
89-
ES6 Javascript with decorators,
90-
ES6 Javascript,
91-
ES5 Javascript
89+
ES6 JavaScript with decorators,
90+
ES6 JavaScript,
91+
ES5 JavaScript
9292
`)
9393

9494
:marked
9595
### Importing and Exporting Application Code
9696

97-
Each file in an Angular TypeScript or ES6 Javascript application constitutes a ES6 module.
97+
Each file in an Angular TypeScript or ES6 JavaScript application constitutes a ES6 module.
9898
When we want to make something from a module available to other modules, we `export` it.
9999

100100
In an Angular ES5 JavaScript application, we load each file to the page using a `<script>` tag.
101101
Each file can make things available to other files via the shared global `window` scope.
102102

103-
We often introduce an application namespace object (such as `"app"`) onto `window` and attach
103+
We often introduce an application namespace object (such as `app`) onto `window` and attach
104104
everything we need to share to that namespace object.
105105
We also wrap our code in an
106106
[Immediately Invoked Function Expression (IIFE)](https://en.wikipedia.org/wiki/Immediately-invoked_function_expression).
@@ -118,16 +118,16 @@ a(id="modularity")
118118
appexport
119119
`,`
120120
Typescript,
121-
ES6 Javascript with decorators,
122-
ES6 Javascript,
123-
ES5 Javascript
121+
ES6 JavaScript with decorators,
122+
ES6 JavaScript,
123+
ES5 JavaScript
124124
`)
125125

126126
:marked
127-
Using Typescript or ES6 Javascript, in other modules we can then `import` things that have been exported
127+
Using Typescript or ES6 JavaScript, in other modules we can then `import` things that have been exported
128128
elsewhere.
129129

130-
On ES5 Javascript we can access anything using the shared namespace in other files.
130+
In ES5 JavaScript we can access anything using the shared namespace in other files.
131131
Note that the order of `<script>` tags on the page is significant.
132132
We must load a file that defines a shared member before a file that uses that member.
133133

@@ -143,9 +143,9 @@ a(id="modularity")
143143
appimport
144144
`,`
145145
Typescript,
146-
ES6 Javascript with decorators,
147-
ES6 Javascript,
148-
ES5 Javascript
146+
ES6 JavaScript with decorators,
147+
ES6 JavaScript,
148+
ES5 JavaScript
149149
`)
150150

151151
.alert.is-helpful
@@ -164,7 +164,7 @@ a(id="class-metadata")
164164

165165
### Classes
166166

167-
We put most of our Angular TypeScript or ES6 Javascript code into classes. ES6 without decorators
167+
We put most of our Angular TypeScript or ES6 JavaScript code into classes. ES6 without decorators
168168
also does not have support for class properties, so they must be assigned inside the constructor.
169169

170170
ES5 JavaScript has no classes. We use the constructor pattern instead which works with
@@ -182,9 +182,9 @@ a(id="class-metadata")
182182
constructorproto
183183
`,`
184184
Typescript,
185-
ES6 Javascript with decorators,
186-
ES6 Javascript,
187-
ES5 Javascript
185+
ES6 JavaScript with decorators,
186+
ES6 JavaScript,
187+
ES5 JavaScript
188188
`)
189189

190190
:marked
@@ -196,12 +196,12 @@ a(id="class-metadata")
196196
For example, a component must have a
197197
[`@Component`](../api/core/index/Component-decorator.html) decorator.
198198

199-
On ES5/6 Javascript we can instead attach an `annotations` array to a class/constructor
199+
In ES5/6 JavaScript we can instead attach an `annotations` array to a class/constructor
200200
to provide metadata.
201201
Each item in the array corresponds to a decorator.
202202

203203
The pattern of creating a constructor and decorating it with metadata is so common that Angular
204-
provides an alternative ES5 convenience class API for it for ES5 Javascript.
204+
provides an alternative ES5 convenience class API for it for ES5 JavaScript.
205205
This API lets us define everything in a single expression.
206206

207207
With this API we first call the `ng.core.Component` function, followed by a chained `Class`
@@ -225,10 +225,10 @@ a(id="class-metadata")
225225
component
226226
`,`
227227
Typescript,
228-
ES6 Javascript with decorators,
229-
ES6 Javascript,
230-
ES5 Javascript,
231-
ES5 Javascript with Class API
228+
ES6 JavaScript with decorators,
229+
ES6 JavaScript,
230+
ES5 JavaScript,
231+
ES5 JavaScript with Class API
232232
`)
233233

234234
:marked
@@ -251,9 +251,9 @@ a(id="class-metadata")
251251
`,`
252252
`,`
253253
Typescript,
254-
ES6 Javascript with decorators,
255-
ES6 Javascript,
256-
ES5 Javascript
254+
ES6 JavaScript with decorators,
255+
ES6 JavaScript,
256+
ES5 JavaScript
257257
`)
258258

259259
a(id="property-metadata")
@@ -286,9 +286,9 @@ a(id="property-metadata")
286286
`,`
287287
`,`
288288
Typescript,
289-
ES6 Javascript with decorators,
290-
ES6 Javascript,
291-
ES5 Javascript
289+
ES6 JavaScript with decorators,
290+
ES6 JavaScript,
291+
ES5 JavaScript
292292
`)
293293

294294
.l-main-section
@@ -320,10 +320,10 @@ a(id="property-metadata")
320320
`,`
321321
`,`
322322
Typescript,
323-
ES6 Javascript with decorators,
324-
ES6 Javascript,
325-
ES5 Javascript,
326-
ES5 Javascript with Class API
323+
ES6 JavaScript with decorators,
324+
ES6 JavaScript,
325+
ES5 JavaScript,
326+
ES5 JavaScript with Class API
327327
`)
328328

329329
:marked
@@ -351,10 +351,10 @@ a(id="property-metadata")
351351
ctor
352352
`,`
353353
Typescript,
354-
ES6 Javascript with decorators,
355-
ES6 Javascript,
356-
ES5 Javascript,
357-
ES5 Javascript with Class API
354+
ES6 JavaScript with decorators,
355+
ES6 JavaScript,
356+
ES5 JavaScript,
357+
ES5 JavaScript with Class API
358358
`)
359359

360360
:marked
@@ -366,9 +366,9 @@ a(id="property-metadata")
366366
inject content child queries with [`@ContentChild`](../api/core/index/ContentChild-decorator.html)
367367
and inject view child queries with [`@ViewChild`](../api/core/index/ViewChild-decorator.html)).
368368

369-
In ES6 Javascript we just add the extra decorators to the nested injection parameters array.
369+
In ES6 JavaScript we just add the extra decorators to the nested injection parameters array.
370370

371-
To achieve the same effect in ES5 JavaScript, use the a nested array with the constructor
371+
To achieve the same effect in ES5 JavaScript, use a nested array with the constructor
372372
array notation in which the injection information precedes the constructor function itself.
373373

374374
We can apply other additional parameter decorators such as
@@ -384,9 +384,9 @@ a(id="property-metadata")
384384
`,`
385385
`,`
386386
Typescript,
387-
ES6 Javascript with decorators,
388-
ES6 Javascript,
389-
ES5 Javascript
387+
ES6 JavaScript with decorators,
388+
ES6 JavaScript,
389+
ES5 JavaScript
390390
`)
391391

392392
a(id="host-query-metadata")
@@ -420,9 +420,9 @@ a(id="host-query-metadata")
420420
`,`
421421
`,`
422422
Typescript,
423-
ES6 Javascript with decorators,
424-
ES6 Javascript,
425-
ES5 Javascript
423+
ES6 JavaScript with decorators,
424+
ES6 JavaScript,
425+
ES5 JavaScript
426426
`)
427427
.alert.is-helpful
428428
:marked
@@ -440,7 +440,7 @@ a(id="host-query-metadata")
440440
allow a component to query instances of other components that are used in
441441
its view.
442442

443-
In ES5/6 Javascript we access a component's view children by adding a `queries` attribute to
443+
In ES5/6 JavaScript we access a component's view children by adding a `queries` attribute to
444444
the component metadata. It should be an object where:
445445

446446
* Each key is the name of a component property that will hold the view children
@@ -458,9 +458,9 @@ a(id="host-query-metadata")
458458
view
459459
`,`
460460
Typescript,
461-
ES6 Javascript with decorators,
462-
ES6 Javascript,
463-
ES5 Javascript
461+
ES6 JavaScript with decorators,
462+
ES6 JavaScript,
463+
ES5 JavaScript
464464
`)
465465

466466
:marked
@@ -484,7 +484,7 @@ a(id="host-query-metadata")
484484
content
485485
`,`
486486
Typescript,
487-
ES6 Javascript with decorators,
488-
ES6 Javascript,
489-
ES5 Javascript
487+
ES6 JavaScript with decorators,
488+
ES6 JavaScript,
489+
ES5 JavaScript
490490
`)

0 commit comments

Comments
 (0)