chore(ng2/dart): update from beta.1x to beta.18 (#1941)

* 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`
This commit is contained in:
Patrice Chalin 2016-07-20 15:51:23 -07:00 committed by Kathy Walrath
parent 738b5509f8
commit eafd7db119
29 changed files with 34 additions and 42 deletions

View File

@ -5,7 +5,7 @@ version: 0.0.1
environment: environment:
sdk: '>=1.13.0 <2.0.0' sdk: '>=1.13.0 <2.0.0'
dependencies: dependencies:
angular2: 2.0.0-beta.17 angular2: 2.0.0-beta.18
browser: ^0.10.0 browser: ^0.10.0
dart_to_js_script_rewriter: ^1.0.1 dart_to_js_script_rewriter: ^1.0.1
transformers: transformers:

View File

@ -5,7 +5,7 @@ version: 0.0.1
environment: environment:
sdk: '>=1.13.0 <2.0.0' sdk: '>=1.13.0 <2.0.0'
dependencies: dependencies:
angular2: 2.0.0-beta.17 angular2: 2.0.0-beta.18
browser: ^0.10.0 browser: ^0.10.0
dart_to_js_script_rewriter: ^1.0.1 dart_to_js_script_rewriter: ^1.0.1
transformers: transformers:

View File

@ -5,7 +5,7 @@ version: 0.0.1
environment: environment:
sdk: '>=1.13.0 <2.0.0' sdk: '>=1.13.0 <2.0.0'
dependencies: dependencies:
angular2: 2.0.0-beta.17 angular2: 2.0.0-beta.18
browser: ^0.10.0 browser: ^0.10.0
dart_to_js_script_rewriter: ^1.0.1 dart_to_js_script_rewriter: ^1.0.1
transformers: transformers:

View File

@ -5,7 +5,7 @@ version: 0.0.1
environment: environment:
sdk: '>=1.13.0 <2.0.0' sdk: '>=1.13.0 <2.0.0'
dependencies: dependencies:
angular2: 2.0.0-beta.17 angular2: 2.0.0-beta.18
browser: ^0.10.0 browser: ^0.10.0
dart_to_js_script_rewriter: ^1.0.1 dart_to_js_script_rewriter: ^1.0.1
transformers: transformers:

View File

@ -5,7 +5,7 @@ version: 0.0.1
environment: environment:
sdk: '>=1.13.0 <2.0.0' sdk: '>=1.13.0 <2.0.0'
dependencies: dependencies:
angular2: 2.0.0-beta.17 angular2: 2.0.0-beta.18
browser: ^0.10.0 browser: ^0.10.0
dart_to_js_script_rewriter: ^1.0.1 dart_to_js_script_rewriter: ^1.0.1
transformers: transformers:

View File

@ -5,7 +5,7 @@ version: 0.0.1
environment: environment:
sdk: '>=1.13.0 <2.0.0' sdk: '>=1.13.0 <2.0.0'
dependencies: dependencies:
angular2: 2.0.0-beta.17 angular2: 2.0.0-beta.18
browser: ^0.10.0 browser: ^0.10.0
dart_to_js_script_rewriter: ^1.0.1 dart_to_js_script_rewriter: ^1.0.1
transformers: transformers:

View File

@ -5,7 +5,7 @@ version: 0.0.1
environment: environment:
sdk: '>=1.13.0 <2.0.0' sdk: '>=1.13.0 <2.0.0'
dependencies: dependencies:
angular2: 2.0.0-beta.17 angular2: 2.0.0-beta.18
browser: ^0.10.0 browser: ^0.10.0
dart_to_js_script_rewriter: ^1.0.1 dart_to_js_script_rewriter: ^1.0.1
transformers: transformers:

View File

@ -5,7 +5,7 @@ version: 0.0.1
environment: environment:
sdk: '>=1.13.0 <2.0.0' sdk: '>=1.13.0 <2.0.0'
dependencies: dependencies:
angular2: 2.0.0-beta.17 angular2: 2.0.0-beta.18
browser: ^0.10.0 browser: ^0.10.0
dart_to_js_script_rewriter: ^1.0.1 dart_to_js_script_rewriter: ^1.0.1
transformers: transformers:

View File

@ -13,13 +13,5 @@ import 'package:angular2/angular2.dart';
*/ */
@Pipe(name: 'exponentialStrength') @Pipe(name: 'exponentialStrength')
class ExponentialStrengthPipe extends PipeTransform { class ExponentialStrengthPipe extends PipeTransform {
num transform(dynamic _value, [List<dynamic> args]) { num transform(num value, num exponent) => math.pow(value, exponent);
var exponent = args.isEmpty
? 1
: args.first is num
? args.first
: num.parse(args.first.toString(), (_) => 1);
var value = _value is num ? _value : num.parse(_value.toString(), (_) => 0);
return math.pow(value, exponent);
}
} }

View File

@ -11,7 +11,7 @@ class FetchJsonPipe extends PipeTransform {
dynamic _fetchedJson; dynamic _fetchedJson;
String _prevUrl; String _prevUrl;
dynamic transform(dynamic url, [List<dynamic> args]) { dynamic transform(String url) {
if (url != _prevUrl) { if (url != _prevUrl) {
_prevUrl = url; _prevUrl = url;
_fetchedJson = null; _fetchedJson = null;

View File

@ -20,7 +20,7 @@ New hero:
<h4>Heroes who fly (piped)</h4> <h4>Heroes who fly (piped)</h4>
<div id="flyers"> <div id="flyers">
<!-- #docregion template-flying-heroes --> <!-- #docregion template-flying-heroes -->
<div *ngFor="#hero of (heroes | flyingHeroes)"> <div *ngFor="let hero of (heroes | flyingHeroes)">
{{hero.name}} {{hero.name}}
</div> </div>
<!-- #enddocregion template-flying-heroes --> <!-- #enddocregion template-flying-heroes -->
@ -30,7 +30,7 @@ New hero:
<div id="all"> <div id="all">
<!-- #docregion template-1 --> <!-- #docregion template-1 -->
<!-- #docregion template-all-heroes --> <!-- #docregion template-all-heroes -->
<div *ngFor="#hero of heroes"> <div *ngFor="let hero of heroes">
{{hero.name}} {{hero.name}}
</div> </div>
<!-- #enddocregion template-all-heroes --> <!-- #enddocregion template-all-heroes -->

View File

@ -6,7 +6,7 @@ import 'heroes.dart';
@Pipe(name: 'flyingHeroes') @Pipe(name: 'flyingHeroes')
class FlyingHeroesPipe extends PipeTransform { class FlyingHeroesPipe extends PipeTransform {
// #docregion filter // #docregion filter
List<Hero> transform(dynamic value, [List<dynamic> args]) => List<Hero> transform(List<Hero> value) =>
value.where((hero) => hero.canFly).toList(); value.where((hero) => hero.canFly).toList();
// #enddocregion filter // #enddocregion filter
} }

View File

@ -9,7 +9,7 @@ import 'fetch_json_pipe.dart';
template: ''' template: '''
<h4>Heroes from JSON File</h4> <h4>Heroes from JSON File</h4>
<div *ngFor="#hero of ('heroes.json' | fetch) "> <div *ngFor="let hero of ('heroes.json' | fetch) ">
{{hero['name']}} {{hero['name']}}
</div> </div>

View File

@ -5,7 +5,7 @@ version: 0.0.1
environment: environment:
sdk: '>=1.13.0 <2.0.0' sdk: '>=1.13.0 <2.0.0'
dependencies: dependencies:
angular2: 2.0.0-beta.15 angular2: 2.0.0-beta.18
browser: ^0.10.0 browser: ^0.10.0
dart_to_js_script_rewriter: ^1.0.1 dart_to_js_script_rewriter: ^1.0.1
transformers: transformers:

View File

@ -5,7 +5,7 @@ version: 0.0.1
environment: environment:
sdk: '>=1.13.0 <2.0.0' sdk: '>=1.13.0 <2.0.0'
dependencies: dependencies:
angular2: 2.0.0-beta.17 angular2: 2.0.0-beta.18
browser: ^0.10.0 browser: ^0.10.0
dart_to_js_script_rewriter: ^1.0.1 dart_to_js_script_rewriter: ^1.0.1
transformers: transformers:

View File

@ -5,7 +5,7 @@ version: 0.0.1
environment: environment:
sdk: '>=1.13.0 <2.0.0' sdk: '>=1.13.0 <2.0.0'
dependencies: dependencies:
angular2: 2.0.0-beta.17 angular2: 2.0.0-beta.18
browser: ^0.10.0 browser: ^0.10.0
dart_to_js_script_rewriter: ^1.0.1 dart_to_js_script_rewriter: ^1.0.1
http: ^0.11.3+3 http: ^0.11.3+3

View File

@ -5,7 +5,7 @@ version: 0.0.1
environment: environment:
sdk: '>=1.13.0 <2.0.0' sdk: '>=1.13.0 <2.0.0'
dependencies: dependencies:
angular2: 2.0.0-beta.17 angular2: 2.0.0-beta.18
browser: ^0.10.0 browser: ^0.10.0
dart_to_js_script_rewriter: ^1.0.1 dart_to_js_script_rewriter: ^1.0.1
transformers: transformers:

View File

@ -5,7 +5,7 @@ version: 0.0.1
environment: environment:
sdk: '>=1.13.0 <2.0.0' sdk: '>=1.13.0 <2.0.0'
dependencies: dependencies:
angular2: 2.0.0-beta.17 angular2: 2.0.0-beta.18
browser: ^0.10.0 browser: ^0.10.0
dart_to_js_script_rewriter: ^1.0.1 dart_to_js_script_rewriter: ^1.0.1
transformers: transformers:

View File

@ -5,7 +5,7 @@ version: 0.0.1
environment: environment:
sdk: '>=1.13.0 <2.0.0' sdk: '>=1.13.0 <2.0.0'
dependencies: dependencies:
angular2: 2.0.0-beta.17 angular2: 2.0.0-beta.18
browser: ^0.10.0 browser: ^0.10.0
dart_to_js_script_rewriter: ^1.0.1 dart_to_js_script_rewriter: ^1.0.1
transformers: transformers:

View File

@ -1,5 +1,5 @@
// #docregion ng-for // #docregion ng-for
<li *ngFor="#hero of heroes"> <li *ngFor="let hero of heroes">
<span class="badge">{{hero.id}}</span> {{hero.name}} <span class="badge">{{hero.id}}</span> {{hero.name}}
</li> </li>
// #enddocregion ng-for // #enddocregion ng-for
@ -7,14 +7,14 @@
// #docregion heroes-styled // #docregion heroes-styled
<h2>My Heroes</h2> <h2>My Heroes</h2>
<ul class="heroes"> <ul class="heroes">
<li *ngFor="#hero of heroes"> <li *ngFor="let hero of heroes">
<span class="badge">{{hero.id}}</span> {{hero.name}} <span class="badge">{{hero.id}}</span> {{hero.name}}
</li> </li>
</ul> </ul>
// #enddocregion heroes-styled // #enddocregion heroes-styled
// #docregion selectedHero-click // #docregion selectedHero-click
<li *ngFor="#hero of heroes" (click)="onSelect(hero)"> <li *ngFor="let hero of heroes" (click)="onSelect(hero)">
<span class="badge">{{hero.id}}</span> {{hero.name}} <span class="badge">{{hero.id}}</span> {{hero.name}}
</li> </li>
// #enddocregion selectedHero-click // #enddocregion selectedHero-click
@ -53,7 +53,7 @@ final List<Hero> heroes = mockHeroes;
// #enddocregion heroes-template-1 // #enddocregion heroes-template-1
// #docregion heroes-ngfor-1 // #docregion heroes-ngfor-1
<li *ngFor="#hero of heroes"> <li *ngFor="let hero of heroes">
// #enddocregion heroes-ngfor-1 // #enddocregion heroes-ngfor-1
// #docregion class-selected-1 // #docregion class-selected-1
@ -61,7 +61,7 @@ final List<Hero> heroes = mockHeroes;
// #enddocregion class-selected-1 // #enddocregion class-selected-1
// #docregion class-selected-2 // #docregion class-selected-2
<li *ngFor="#hero of heroes" <li *ngFor="let hero of heroes"
[class.selected]="hero == selectedHero" [class.selected]="hero == selectedHero"
(click)="onSelect(hero)"> (click)="onSelect(hero)">
<span class="badge">{{hero.id}}</span> {{hero.name}} <span class="badge">{{hero.id}}</span> {{hero.name}}

View File

@ -5,7 +5,7 @@ version: 0.0.1
environment: environment:
sdk: '>=1.13.0 <2.0.0' sdk: '>=1.13.0 <2.0.0'
dependencies: dependencies:
angular2: 2.0.0-beta.17 angular2: 2.0.0-beta.18
browser: ^0.10.0 browser: ^0.10.0
dart_to_js_script_rewriter: ^1.0.1 dart_to_js_script_rewriter: ^1.0.1
transformers: transformers:

View File

@ -5,7 +5,7 @@ version: 0.0.1
environment: environment:
sdk: '>=1.13.0 <2.0.0' sdk: '>=1.13.0 <2.0.0'
dependencies: dependencies:
angular2: 2.0.0-beta.17 angular2: 2.0.0-beta.18
browser: ^0.10.0 browser: ^0.10.0
dart_to_js_script_rewriter: ^1.0.1 dart_to_js_script_rewriter: ^1.0.1
transformers: transformers:

View File

@ -5,7 +5,7 @@ version: 0.0.1
environment: environment:
sdk: '>=1.13.0 <2.0.0' sdk: '>=1.13.0 <2.0.0'
dependencies: dependencies:
angular2: 2.0.0-beta.17 angular2: 2.0.0-beta.18
browser: ^0.10.0 browser: ^0.10.0
dart_to_js_script_rewriter: ^1.0.1 dart_to_js_script_rewriter: ^1.0.1
transformers: transformers:

View File

@ -5,7 +5,7 @@ version: 0.0.1
environment: environment:
sdk: '>=1.13.0 <2.0.0' sdk: '>=1.13.0 <2.0.0'
dependencies: dependencies:
angular2: 2.0.0-beta.17 angular2: 2.0.0-beta.18
browser: ^0.10.0 browser: ^0.10.0
dart_to_js_script_rewriter: ^1.0.1 dart_to_js_script_rewriter: ^1.0.1
transformers: transformers:

View File

@ -7,7 +7,7 @@ environment:
sdk: '>=1.13.0 <2.0.0' sdk: '>=1.13.0 <2.0.0'
# #docregion additions # #docregion additions
dependencies: dependencies:
angular2: 2.0.0-beta.17 angular2: 2.0.0-beta.18
# #enddocregion additions # #enddocregion additions
browser: ^0.10.0 browser: ^0.10.0
dart_to_js_script_rewriter: ^1.0.1 dart_to_js_script_rewriter: ^1.0.1

View File

@ -5,7 +5,7 @@ version: 0.0.1
environment: environment:
sdk: '>=1.13.0 <2.0.0' sdk: '>=1.13.0 <2.0.0'
dependencies: dependencies:
angular2: 2.0.0-beta.17 angular2: 2.0.0-beta.18
browser: ^0.10.0 browser: ^0.10.0
dart_to_js_script_rewriter: ^1.0.1 dart_to_js_script_rewriter: ^1.0.1
transformers: transformers:

View File

@ -3,7 +3,7 @@
"icon": "home", "icon": "home",
"title": "Angular Docs", "title": "Angular Docs",
"menuTitle": "Docs Home", "menuTitle": "Docs Home",
"banner": "Welcome to <b>angular.io/dart</b>! The current Angular 2 Dart release is <b>beta.17</b>. Consult the <a href='https://github.com/angular/angular/blob/master/CHANGELOG.md' target='_blank'>Change Log</a> about recent enhancements, fixes, and breaking changes." "banner": "Welcome to <b>angular.io/dart</b>! The current Angular 2 Dart release is <b>beta.18</b>. Consult the <a href='https://github.com/angular/angular/blob/master/CHANGELOG.md' target='_blank'>Change Log</a> about recent enhancements, fixes, and breaking changes."
}, },
"quickstart": { "quickstart": {

View File

@ -31,7 +31,7 @@ block package-and-config-files
packages as dependencies, as well as the `angular2` transformer. packages as dependencies, as well as the `angular2` transformer.
It can also specify other packages and transformers for the app to use, It can also specify other packages and transformers for the app to use,
such as [dart_to_js_script_rewriter](https://pub.dartlang.org/packages/dart_to_js_script_rewriter). such as [dart_to_js_script_rewriter](https://pub.dartlang.org/packages/dart_to_js_script_rewriter).
Angular 2 is still changing, so provide an exact version: **2.0.0-beta.17**. Angular 2 is still changing, so provide an exact version: **2.0.0-beta.18**.
[pubspec]: https://www.dartlang.org/tools/pub/pubspec.html [pubspec]: https://www.dartlang.org/tools/pub/pubspec.html

View File

@ -4,7 +4,7 @@ version: 0.0.1
environment: environment:
sdk: '>=1.13.0 <2.0.0' sdk: '>=1.13.0 <2.0.0'
dependencies: dependencies:
angular2: 2.0.0-beta.17 angular2: 2.0.0-beta.18
browser: ^0.10.0 browser: ^0.10.0
dart_to_js_script_rewriter: ^1.0.1 dart_to_js_script_rewriter: ^1.0.1
transformers: transformers: