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

Commit 5a5122a

Browse files
committed
docs(cb-a1-a2): fixes suggested by Georgios Kalpakas + add newlines
closes #885
1 parent 524ff05 commit 5a5122a

File tree

10 files changed

+21
-18
lines changed

10 files changed

+21
-18
lines changed

public/docs/_examples/cb-a1-a2-quick-reference/ts/app/app.component.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ img {height: 100px;}
1212
table td {
1313
padding: 4px;
1414
border: 1px solid #e0e0e0;
15-
}
15+
}

public/docs/_examples/cb-a1-a2-quick-reference/ts/app/app.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,4 @@ export class AppComponent {
3737
this.movies = movieService.getMovies();
3838
this.movie = this.movies[0];
3939
}
40-
}
40+
}

public/docs/_examples/cb-a1-a2-quick-reference/ts/app/date.pipe.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ export class StringSafeDatePipe extends DatePipe {
1111
return super.transform(value, args);
1212
}
1313
}
14-
// #enddocregion date-pipe
14+
// #enddocregion date-pipe

public/docs/_examples/cb-a1-a2-quick-reference/ts/app/movie-list.component.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,4 +54,4 @@ table tr:last-child td:last-child {
5454
-moz-border-radius-bottomright:3px;
5555
-webkit-border-bottom-right-radius:3px;
5656
border-bottom-right-radius:3px;
57-
}
57+
}

public/docs/_examples/cb-a1-a2-quick-reference/ts/app/movie-list.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,4 +75,4 @@ <h3 [hidden]="!favoriteHero">
7575
</tr>
7676
</tbody>
7777
</table>
78-
</div>
78+
</div>

public/docs/_examples/cb-a1-a2-quick-reference/ts/app/movie-list.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,4 @@ export class MovieListComponent {
4545
}
4646
// #docregion class
4747
}
48-
// #enddocregion class
48+
// #enddocregion class

public/docs/_examples/cb-a1-a2-quick-reference/ts/app/movie.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,4 @@ export class MovieService {
4040
}
4141
];
4242
}
43-
}
43+
}

public/docs/_examples/cb-a1-a2-quick-reference/ts/app/movie.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ export interface IMovie {
99
releaseDate: string;
1010
starRating: number;
1111
title: string;
12-
}
12+
}

public/docs/_examples/cb-a1-a2-quick-reference/ts/plnkr.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
"!**/*.[1].*"
77
],
88
"tags":["cookbook"]
9-
}
9+
}

public/docs/ts/latest/cookbook/a1-a2-quick-reference.jade

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ a(id="top")
1212
This chapter covers
1313
* [Template Basics](#template-basics) - binding and local variables
1414

15-
* [Template Directives](#template-directives) - built-in directives `ngIf` and ` `ngClass`
15+
* [Template Directives](#template-directives) - built-in directives `ngIf` and `ngClass`
1616

1717
* [Filters/Pipes](#filters-pipes) - built-in *filters*, known as *pipes* in Angular&nbsp;2
1818

@@ -71,7 +71,7 @@ table(width="100%")
7171
:marked
7272
To filter output in our templates in Angular&nbsp;1, we use the pipe character (|) and one or more filters.
7373

74-
In this example, we filter the `mpaa` property to uppercase.
74+
In this example, we filter the `title` property to uppercase.
7575
td
7676
:marked
7777
### Pipes
@@ -170,7 +170,7 @@ table(width="100%")
170170

171171
We can specify multiple classes as shown in the second example.
172172

173-
Angular&nbsp;2 also has **class binding**, which is good way to add or remove a single class
173+
Angular&nbsp;2 also has **class binding**, which is a good way to add or remove a single class
174174
as shown in the third example.
175175

176176
For more information see [Template Syntax](../guide/template-syntax.html#other-bindings).
@@ -283,7 +283,7 @@ table(width="100%")
283283
In Angular&nbsp;1, the `ng-if` directive removes or recreates a portion of the DOM
284284
based on an expression. If the expression is false, the element is removed from the DOM.
285285

286-
In this example, the `table` element is removed from the DOM unless the `movies` array has a length.
286+
In this example, the `table` element is removed from the DOM unless the `movies` array has a length greater than zero.
287287
td
288288
:marked
289289
### *ngIf
@@ -515,7 +515,6 @@ table(width="100%")
515515
td
516516
:marked
517517
### none
518-
:marked
519518
There is no comparable pipe in Angular&nbsp;2 for performance reasons.
520519
Filtering should be coded in the component.
521520
Consider building a custom pipe if the same filtering code
@@ -540,16 +539,19 @@ table(width="100%")
540539
:marked
541540
### limitTo
542541
code-example.
543-
&lt;tr ng-repeat="movie in movieList | limitTo: 2">
542+
&lt;tr ng-repeat="movie in movieList | limitTo:2:0">
544543
:marked
545-
Selects the defined number of items from the collection.
544+
Selects up to the first parameter (2) number of items from the collection
545+
starting (optionally) at the beginning index (0).
546546
td
547547
:marked
548548
### slice
549549
+makeExample('cb-a1-a2-quick-reference/ts/app/app.component.html', 'slice')(format=".")
550550
:marked
551-
The first parameter of the `SlicePipe` is the starting index; the second is the limit.
552-
As in Angular 1, performance may improve if this operation is coded in the component.
551+
The `SlicePipe` does the same thing but the *order of the parameters is reversed* in keeping
552+
with the JavaScript `Slice` method.
553+
The first parameter is the starting index; the second is the limit.
554+
As in Angular 1, performance may improve if we code this operation within the component instead.
553555
tr(style=top)
554556
td
555557
:marked
@@ -624,6 +626,7 @@ table(width="100%")
624626
### IIFE
625627
code-example.
626628
(function () {
629+
...
627630
}());
628631
:marked
629632
In Angular&nbsp;1, we often defined an immediately invoked function expression (or IIFE) around our controller code.

0 commit comments

Comments
 (0)