Skip to content
This repository has been archived by the owner on Mar 20, 2024. It is now read-only.

Commit

Permalink
chore(ng2/dart): update from beta.1x to beta.18 (#1941)
Browse files Browse the repository at this point in the history
* 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`
  • Loading branch information
chalin authored and ocombe committed Jul 22, 2016
1 parent c7fea11 commit a831fd4
Show file tree
Hide file tree
Showing 29 changed files with 34 additions and 42 deletions.
2 changes: 1 addition & 1 deletion public/docs/_examples/architecture/dart/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ version: 0.0.1
environment:
sdk: '>=1.13.0 <2.0.0'
dependencies:
angular2: 2.0.0-beta.17
angular2: 2.0.0-beta.18
browser: ^0.10.0
dart_to_js_script_rewriter: ^1.0.1
transformers:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ version: 0.0.1
environment:
sdk: '>=1.13.0 <2.0.0'
dependencies:
angular2: 2.0.0-beta.17
angular2: 2.0.0-beta.18
browser: ^0.10.0
dart_to_js_script_rewriter: ^1.0.1
transformers:
Expand Down
2 changes: 1 addition & 1 deletion public/docs/_examples/component-styles/dart/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ version: 0.0.1
environment:
sdk: '>=1.13.0 <2.0.0'
dependencies:
angular2: 2.0.0-beta.17
angular2: 2.0.0-beta.18
browser: ^0.10.0
dart_to_js_script_rewriter: ^1.0.1
transformers:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ version: 0.0.1
environment:
sdk: '>=1.13.0 <2.0.0'
dependencies:
angular2: 2.0.0-beta.17
angular2: 2.0.0-beta.18
browser: ^0.10.0
dart_to_js_script_rewriter: ^1.0.1
transformers:
Expand Down
2 changes: 1 addition & 1 deletion public/docs/_examples/displaying-data/dart/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ version: 0.0.1
environment:
sdk: '>=1.13.0 <2.0.0'
dependencies:
angular2: 2.0.0-beta.17
angular2: 2.0.0-beta.18
browser: ^0.10.0
dart_to_js_script_rewriter: ^1.0.1
transformers:
Expand Down
2 changes: 1 addition & 1 deletion public/docs/_examples/forms/dart/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ version: 0.0.1
environment:
sdk: '>=1.13.0 <2.0.0'
dependencies:
angular2: 2.0.0-beta.17
angular2: 2.0.0-beta.18
browser: ^0.10.0
dart_to_js_script_rewriter: ^1.0.1
transformers:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ version: 0.0.1
environment:
sdk: '>=1.13.0 <2.0.0'
dependencies:
angular2: 2.0.0-beta.17
angular2: 2.0.0-beta.18
browser: ^0.10.0
dart_to_js_script_rewriter: ^1.0.1
transformers:
Expand Down
2 changes: 1 addition & 1 deletion public/docs/_examples/lifecycle-hooks/dart/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ version: 0.0.1
environment:
sdk: '>=1.13.0 <2.0.0'
dependencies:
angular2: 2.0.0-beta.17
angular2: 2.0.0-beta.18
browser: ^0.10.0
dart_to_js_script_rewriter: ^1.0.1
transformers:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,5 @@ import 'package:angular2/angular2.dart';
*/
@Pipe(name: 'exponentialStrength')
class ExponentialStrengthPipe extends PipeTransform {
num transform(dynamic _value, [List<dynamic> args]) {
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);
}
num transform(num value, num exponent) => math.pow(value, exponent);
}
2 changes: 1 addition & 1 deletion public/docs/_examples/pipes/dart/lib/fetch_json_pipe.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class FetchJsonPipe extends PipeTransform {
dynamic _fetchedJson;
String _prevUrl;

dynamic transform(dynamic url, [List<dynamic> args]) {
dynamic transform(String url) {
if (url != _prevUrl) {
_prevUrl = url;
_fetchedJson = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ <h2>{{title}}</h2>
<h4>Heroes who fly (piped)</h4>
<div id="flyers">
<!-- #docregion template-flying-heroes -->
<div *ngFor="#hero of (heroes | flyingHeroes)">
<div *ngFor="let hero of (heroes | flyingHeroes)">
{{hero.name}}
</div>
<!-- #enddocregion template-flying-heroes -->
Expand All @@ -30,7 +30,7 @@ <h4>All Heroes (no pipe)</h4>
<div id="all">
<!-- #docregion template-1 -->
<!-- #docregion template-all-heroes -->
<div *ngFor="#hero of heroes">
<div *ngFor="let hero of heroes">
{{hero.name}}
</div>
<!-- #enddocregion template-all-heroes -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import 'heroes.dart';
@Pipe(name: 'flyingHeroes')
class FlyingHeroesPipe extends PipeTransform {
// #docregion filter
List<Hero> transform(dynamic value, [List<dynamic> args]) =>
List<Hero> transform(List<Hero> value) =>
value.where((hero) => hero.canFly).toList();
// #enddocregion filter
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import 'fetch_json_pipe.dart';
template: '''
<h4>Heroes from JSON File</h4>
<div *ngFor="#hero of ('heroes.json' | fetch) ">
<div *ngFor="let hero of ('heroes.json' | fetch) ">
{{hero['name']}}
</div>
Expand Down
2 changes: 1 addition & 1 deletion public/docs/_examples/pipes/dart/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ version: 0.0.1
environment:
sdk: '>=1.13.0 <2.0.0'
dependencies:
angular2: 2.0.0-beta.15
angular2: 2.0.0-beta.18
browser: ^0.10.0
dart_to_js_script_rewriter: ^1.0.1
transformers:
Expand Down
2 changes: 1 addition & 1 deletion public/docs/_examples/quickstart/dart/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ version: 0.0.1
environment:
sdk: '>=1.13.0 <2.0.0'
dependencies:
angular2: 2.0.0-beta.17
angular2: 2.0.0-beta.18
browser: ^0.10.0
dart_to_js_script_rewriter: ^1.0.1
transformers:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ version: 0.0.1
environment:
sdk: '>=1.13.0 <2.0.0'
dependencies:
angular2: 2.0.0-beta.17
angular2: 2.0.0-beta.18
browser: ^0.10.0
dart_to_js_script_rewriter: ^1.0.1
http: ^0.11.3+3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ version: 0.0.1
environment:
sdk: '>=1.13.0 <2.0.0'
dependencies:
angular2: 2.0.0-beta.17
angular2: 2.0.0-beta.18
browser: ^0.10.0
dart_to_js_script_rewriter: ^1.0.1
transformers:
Expand Down
2 changes: 1 addition & 1 deletion public/docs/_examples/template-syntax/dart/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ version: 0.0.1
environment:
sdk: '>=1.13.0 <2.0.0'
dependencies:
angular2: 2.0.0-beta.17
angular2: 2.0.0-beta.18
browser: ^0.10.0
dart_to_js_script_rewriter: ^1.0.1
transformers:
Expand Down
2 changes: 1 addition & 1 deletion public/docs/_examples/toh-1/dart/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ version: 0.0.1
environment:
sdk: '>=1.13.0 <2.0.0'
dependencies:
angular2: 2.0.0-beta.17
angular2: 2.0.0-beta.18
browser: ^0.10.0
dart_to_js_script_rewriter: ^1.0.1
transformers:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
// #docregion ng-for
<li *ngFor="#hero of heroes">
<li *ngFor="let hero of heroes">
<span class="badge">{{hero.id}}</span> {{hero.name}}
</li>
// #enddocregion ng-for

// #docregion heroes-styled
<h2>My Heroes</h2>
<ul class="heroes">
<li *ngFor="#hero of heroes">
<li *ngFor="let hero of heroes">
<span class="badge">{{hero.id}}</span> {{hero.name}}
</li>
</ul>
// #enddocregion heroes-styled

// #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}}
</li>
// #enddocregion selectedHero-click
Expand Down Expand Up @@ -53,15 +53,15 @@ final List<Hero> heroes = mockHeroes;
// #enddocregion heroes-template-1

// #docregion heroes-ngfor-1
<li *ngFor="#hero of heroes">
<li *ngFor="let hero of heroes">
// #enddocregion heroes-ngfor-1

// #docregion class-selected-1
[class.selected]="hero == selectedHero"
// #enddocregion class-selected-1

// #docregion class-selected-2
<li *ngFor="#hero of heroes"
<li *ngFor="let hero of heroes"
[class.selected]="hero == selectedHero"
(click)="onSelect(hero)">
<span class="badge">{{hero.id}}</span> {{hero.name}}
Expand Down
2 changes: 1 addition & 1 deletion public/docs/_examples/toh-2/dart/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ version: 0.0.1
environment:
sdk: '>=1.13.0 <2.0.0'
dependencies:
angular2: 2.0.0-beta.17
angular2: 2.0.0-beta.18
browser: ^0.10.0
dart_to_js_script_rewriter: ^1.0.1
transformers:
Expand Down
2 changes: 1 addition & 1 deletion public/docs/_examples/toh-3/dart/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ version: 0.0.1
environment:
sdk: '>=1.13.0 <2.0.0'
dependencies:
angular2: 2.0.0-beta.17
angular2: 2.0.0-beta.18
browser: ^0.10.0
dart_to_js_script_rewriter: ^1.0.1
transformers:
Expand Down
2 changes: 1 addition & 1 deletion public/docs/_examples/toh-4/dart/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ version: 0.0.1
environment:
sdk: '>=1.13.0 <2.0.0'
dependencies:
angular2: 2.0.0-beta.17
angular2: 2.0.0-beta.18
browser: ^0.10.0
dart_to_js_script_rewriter: ^1.0.1
transformers:
Expand Down
2 changes: 1 addition & 1 deletion public/docs/_examples/toh-5/dart/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ version: 0.0.1
environment:
sdk: '>=1.13.0 <2.0.0'
dependencies:
angular2: 2.0.0-beta.17
angular2: 2.0.0-beta.18
browser: ^0.10.0
dart_to_js_script_rewriter: ^1.0.1
transformers:
Expand Down
2 changes: 1 addition & 1 deletion public/docs/_examples/toh-6/dart/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ environment:
sdk: '>=1.13.0 <2.0.0'
# #docregion additions
dependencies:
angular2: 2.0.0-beta.17
angular2: 2.0.0-beta.18
# #enddocregion additions
browser: ^0.10.0
dart_to_js_script_rewriter: ^1.0.1
Expand Down
2 changes: 1 addition & 1 deletion public/docs/_examples/user-input/dart/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ version: 0.0.1
environment:
sdk: '>=1.13.0 <2.0.0'
dependencies:
angular2: 2.0.0-beta.17
angular2: 2.0.0-beta.18
browser: ^0.10.0
dart_to_js_script_rewriter: ^1.0.1
transformers:
Expand Down
2 changes: 1 addition & 1 deletion public/docs/dart/latest/_data.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"icon": "home",
"title": "Angular Docs",
"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": {
Expand Down
2 changes: 1 addition & 1 deletion public/docs/dart/latest/quickstart.jade
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ block package-and-config-files
packages as dependencies, as well as the `angular2` transformer.
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).
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

Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version: 0.0.1
environment:
sdk: '>=1.13.0 <2.0.0'
dependencies:
angular2: 2.0.0-beta.17
angular2: 2.0.0-beta.18
browser: ^0.10.0
dart_to_js_script_rewriter: ^1.0.1
transformers:
Expand Down

0 comments on commit a831fd4

Please sign in to comment.