* chore(ng2/dart): update from beta.1x to beta.18 Update made to all `pubspec.yaml` files and to relevant prose. Note that pipes was back a beta.15; the rest were at beta.17. * chore(pipes/dart): update ngFor microsyntax and transform method param Updates to pipe example source code: - Pipe `transform()` method parameters - `ngFor` microsyntax, from `#` to `let`
39 lines
1010 B
HTML
39 lines
1010 B
HTML
<!-- #docplaster-->
|
|
<!-- #docregion -->
|
|
<h2>{{title}}</h2>
|
|
<p>
|
|
<!-- #docregion template-1 -->
|
|
New hero:
|
|
<input type="text" #box
|
|
(keyup.enter)="addHero(box.value); box.value=''"
|
|
placeholder="hero name">
|
|
<!-- #enddocregion template-1 -->
|
|
<input id="can-fly" type="checkbox" [(ngModel)]="canFly"> can fly
|
|
</p>
|
|
<p>
|
|
<input id="mutate" type="checkbox" [(ngModel)]="mutate">Mutate array
|
|
<!-- #docregion template-1 -->
|
|
<button (click)="reset()">Reset</button>
|
|
<!-- #enddocregion template-1 -->
|
|
</p>
|
|
|
|
<h4>Heroes who fly (piped)</h4>
|
|
<div id="flyers">
|
|
<!-- #docregion template-flying-heroes -->
|
|
<div *ngFor="let hero of (heroes | flyingHeroes)">
|
|
{{hero.name}}
|
|
</div>
|
|
<!-- #enddocregion template-flying-heroes -->
|
|
</div>
|
|
|
|
<h4>All Heroes (no pipe)</h4>
|
|
<div id="all">
|
|
<!-- #docregion template-1 -->
|
|
<!-- #docregion template-all-heroes -->
|
|
<div *ngFor="let hero of heroes">
|
|
{{hero.name}}
|
|
</div>
|
|
<!-- #enddocregion template-all-heroes -->
|
|
<!-- #enddocregion template-1 -->
|
|
</div>
|