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:
parent
738b5509f8
commit
eafd7db119
|
@ -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:
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -20,7 +20,7 @@ New hero:
|
|||
<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 -->
|
||||
|
@ -30,7 +30,7 @@ New hero:
|
|||
<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 -->
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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>
|
||||
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// #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
|
||||
|
@ -7,14 +7,14 @@
|
|||
// #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
|
||||
|
@ -53,7 +53,7 @@ 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
|
||||
|
@ -61,7 +61,7 @@ final List<Hero> heroes = mockHeroes;
|
|||
// #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}}
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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": {
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue