diff --git a/public/docs/_examples/architecture/dart/pubspec.yaml b/public/docs/_examples/architecture/dart/pubspec.yaml index ae0dd30e42..874433fc58 100644 --- a/public/docs/_examples/architecture/dart/pubspec.yaml +++ b/public/docs/_examples/architecture/dart/pubspec.yaml @@ -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.16 browser: ^0.10.0 dart_to_js_script_rewriter: ^1.0.1 transformers: diff --git a/public/docs/_examples/attribute-directives/dart/pubspec.yaml b/public/docs/_examples/attribute-directives/dart/pubspec.yaml index b38d0d31a1..b8442185f4 100644 --- a/public/docs/_examples/attribute-directives/dart/pubspec.yaml +++ b/public/docs/_examples/attribute-directives/dart/pubspec.yaml @@ -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.16 browser: ^0.10.0 dart_to_js_script_rewriter: ^1.0.1 transformers: diff --git a/public/docs/_examples/dependency-injection/dart/lib/car/car_injector.dart b/public/docs/_examples/dependency-injection/dart/lib/car/car_injector.dart index d3da37a9e7..c5502413f6 100644 --- a/public/docs/_examples/dependency-injection/dart/lib/car/car_injector.dart +++ b/public/docs/_examples/dependency-injection/dart/lib/car/car_injector.dart @@ -7,20 +7,20 @@ import 'car.dart'; //#docregion injector Car useInjector() { - Injector injector; + ReflectiveInjector injector; //#enddocregion injector /* //#docregion injector-no-new - // Cannot 'new' an Injector like this! - var injector = new Injector([Car, Engine, Tires, Logger]); + // Cannot 'new' an ReflectiveInjector like this! + var injector = new ReflectiveInjector([Car, Engine, Tires, Logger]); //#enddocregion injector-no-new */ //#docregion injector //#docregion injector-create-and-call - injector = Injector.resolveAndCreate([Car, Engine, Tires, Logger]); + injector = ReflectiveInjector.resolveAndCreate([Car, Engine, Tires, Logger]); //#docregion injector-call var car = injector.get(Car); //#enddocregion injector-call diff --git a/public/docs/_examples/dependency-injection/dart/lib/injector_component.dart b/public/docs/_examples/dependency-injection/dart/lib/injector_component.dart index ecc85f9c39..aba047cf75 100644 --- a/public/docs/_examples/dependency-injection/dart/lib/injector_component.dart +++ b/public/docs/_examples/dependency-injection/dart/lib/injector_component.dart @@ -31,11 +31,12 @@ class InjectorComponent { Hero hero; String get rodent { - var rous = _injector.getOptional(ROUS); - if (rous != null) { - throw new Exception('Aaaargh!'); + try { + _injector.get(ROUS); + } on NoProviderError { + return "R.O.U.S.'s? I don't think they exist!"; } - return "R.O.U.S.'s? I don't think they exist!"; + throw new Exception('Aaaargh!'); } InjectorComponent(this._injector) { diff --git a/public/docs/_examples/dependency-injection/dart/pubspec.yaml b/public/docs/_examples/dependency-injection/dart/pubspec.yaml index 8ebf580e73..88051c514e 100644 --- a/public/docs/_examples/dependency-injection/dart/pubspec.yaml +++ b/public/docs/_examples/dependency-injection/dart/pubspec.yaml @@ -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.16 browser: ^0.10.0 dart_to_js_script_rewriter: ^1.0.1 transformers: diff --git a/public/docs/_examples/displaying-data/dart/pubspec.yaml b/public/docs/_examples/displaying-data/dart/pubspec.yaml index d4f309f79f..c8d24433b0 100644 --- a/public/docs/_examples/displaying-data/dart/pubspec.yaml +++ b/public/docs/_examples/displaying-data/dart/pubspec.yaml @@ -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.16 browser: ^0.10.0 dart_to_js_script_rewriter: ^1.0.1 transformers: diff --git a/public/docs/_examples/forms/dart/pubspec.yaml b/public/docs/_examples/forms/dart/pubspec.yaml index 056dd6cda7..50f0695524 100644 --- a/public/docs/_examples/forms/dart/pubspec.yaml +++ b/public/docs/_examples/forms/dart/pubspec.yaml @@ -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.16 browser: ^0.10.0 dart_to_js_script_rewriter: ^1.0.1 transformers: diff --git a/public/docs/_examples/hierarchical-dependency-injection/dart/pubspec.yaml b/public/docs/_examples/hierarchical-dependency-injection/dart/pubspec.yaml index 68c8e5b71a..0abb1e29bd 100644 --- a/public/docs/_examples/hierarchical-dependency-injection/dart/pubspec.yaml +++ b/public/docs/_examples/hierarchical-dependency-injection/dart/pubspec.yaml @@ -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.16 browser: ^0.10.0 dart_to_js_script_rewriter: ^1.0.1 transformers: diff --git a/public/docs/_examples/lifecycle-hooks/dart/pubspec.yaml b/public/docs/_examples/lifecycle-hooks/dart/pubspec.yaml index f0cbce54da..adef012f2e 100644 --- a/public/docs/_examples/lifecycle-hooks/dart/pubspec.yaml +++ b/public/docs/_examples/lifecycle-hooks/dart/pubspec.yaml @@ -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.16 browser: ^0.10.0 dart_to_js_script_rewriter: ^1.0.1 transformers: diff --git a/public/docs/_examples/pipes/dart/lib/exponential_strength_pipe.dart b/public/docs/_examples/pipes/dart/lib/exponential_strength_pipe.dart index b84297950c..aefaf93938 100644 --- a/public/docs/_examples/pipes/dart/lib/exponential_strength_pipe.dart +++ b/public/docs/_examples/pipes/dart/lib/exponential_strength_pipe.dart @@ -3,24 +3,18 @@ import 'dart:math' as math; import 'package:angular2/angular2.dart'; /* -* Raise the value exponentially -* Takes a value that defaults to 0 and an exponent argument that defaults to 1. -* Checks for value to be a string or number. -* Usage: -* value | exponentialStrength:exponent -* Example: -* {{ 2 | exponentialStrength:10}} -* formats to: 1024 -*/ - + * Raise the value exponentially + * Takes an exponent argument that defaults to 1. + * Usage: + * value | exponentialStrength:exponent + * Example: + * {{ 2 | exponentialStrength:10}} + * formats to: 1024 + */ @Pipe(name: 'exponentialStrength') -@Injectable() +@Injectable() // FIXME(chalin): unnecessary? class ExponentialStrengthPipe extends PipeTransform { - transform(dynamic value, [List args]) { - var v = int.parse(value.toString(), onError: (source) => 0); - var p = args.isEmpty - ? 1 - : int.parse(args.first.toString(), onError: (source) => 1); - return math.pow(v, p); - } + num transform(num value, String exponent) => + math.pow(value, + num.parse(exponent, onError: (_) => 1)); } diff --git a/public/docs/_examples/pipes/dart/lib/fetch_json_pipe.dart b/public/docs/_examples/pipes/dart/lib/fetch_json_pipe.dart index e07f58ff53..8484d3d6ae 100644 --- a/public/docs/_examples/pipes/dart/lib/fetch_json_pipe.dart +++ b/public/docs/_examples/pipes/dart/lib/fetch_json_pipe.dart @@ -1,18 +1,22 @@ +// #docregion import 'dart:html'; import 'dart:async'; import 'dart:convert'; import 'package:angular2/angular2.dart'; +// #docregion pipe-metadata @Pipe(name: 'fetch', pure: false) -@Injectable() +// #enddocregion pipe-metadata +@Injectable() // FIXME(chalin): unnecessary? class FetchJsonPipe extends PipeTransform { dynamic _fetchedValue; Future _fetchPromise; - transform(dynamic value, [List args]) { + + transform(String url) { if (_fetchPromise == null) { _fetchPromise = new Future(() async { - _fetchedValue = JSON.decode(await HttpRequest.getString(value)); + _fetchedValue = JSON.decode(await HttpRequest.getString(url)); }); } return _fetchedValue; diff --git a/public/docs/_examples/pipes/dart/pubspec.yaml b/public/docs/_examples/pipes/dart/pubspec.yaml index 848c11cd1c..57417ac6c0 100644 --- a/public/docs/_examples/pipes/dart/pubspec.yaml +++ b/public/docs/_examples/pipes/dart/pubspec.yaml @@ -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.16 browser: ^0.10.0 dart_to_js_script_rewriter: ^1.0.1 transformers: diff --git a/public/docs/_examples/quickstart/dart/pubspec.yaml b/public/docs/_examples/quickstart/dart/pubspec.yaml index fba4eb990d..6d4ab0ae19 100644 --- a/public/docs/_examples/quickstart/dart/pubspec.yaml +++ b/public/docs/_examples/quickstart/dart/pubspec.yaml @@ -7,7 +7,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.16 browser: ^0.10.0 # #enddocregion no-rewriter dart_to_js_script_rewriter: ^1.0.1 diff --git a/public/docs/_examples/structural-directives/dart/pubspec.yaml b/public/docs/_examples/structural-directives/dart/pubspec.yaml index e774e73f66..796fd85a9b 100644 --- a/public/docs/_examples/structural-directives/dart/pubspec.yaml +++ b/public/docs/_examples/structural-directives/dart/pubspec.yaml @@ -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.16 browser: ^0.10.0 dart_to_js_script_rewriter: ^1.0.1 transformers: diff --git a/public/docs/_examples/template-syntax/dart/pubspec.yaml b/public/docs/_examples/template-syntax/dart/pubspec.yaml index 43df9c5d0f..10fe491e9f 100644 --- a/public/docs/_examples/template-syntax/dart/pubspec.yaml +++ b/public/docs/_examples/template-syntax/dart/pubspec.yaml @@ -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.16 browser: ^0.10.0 dart_to_js_script_rewriter: ^1.0.1 transformers: diff --git a/public/docs/_examples/toh-1/dart/pubspec.yaml b/public/docs/_examples/toh-1/dart/pubspec.yaml index 5380671689..1a367b506c 100644 --- a/public/docs/_examples/toh-1/dart/pubspec.yaml +++ b/public/docs/_examples/toh-1/dart/pubspec.yaml @@ -4,7 +4,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.16 browser: ^0.10.0 dart_to_js_script_rewriter: ^1.0.1 transformers: diff --git a/public/docs/_examples/toh-2/dart/pubspec.yaml b/public/docs/_examples/toh-2/dart/pubspec.yaml index f4d1c8caa0..da349a8725 100644 --- a/public/docs/_examples/toh-2/dart/pubspec.yaml +++ b/public/docs/_examples/toh-2/dart/pubspec.yaml @@ -3,7 +3,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.16 browser: ^0.10.0 dart_to_js_script_rewriter: ^1.0.1 transformers: diff --git a/public/docs/_examples/toh-3/dart/pubspec.yaml b/public/docs/_examples/toh-3/dart/pubspec.yaml index f4d1c8caa0..da349a8725 100644 --- a/public/docs/_examples/toh-3/dart/pubspec.yaml +++ b/public/docs/_examples/toh-3/dart/pubspec.yaml @@ -3,7 +3,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.16 browser: ^0.10.0 dart_to_js_script_rewriter: ^1.0.1 transformers: diff --git a/public/docs/_examples/toh-4/dart/pubspec.yaml b/public/docs/_examples/toh-4/dart/pubspec.yaml index f4d1c8caa0..da349a8725 100644 --- a/public/docs/_examples/toh-4/dart/pubspec.yaml +++ b/public/docs/_examples/toh-4/dart/pubspec.yaml @@ -3,7 +3,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.16 browser: ^0.10.0 dart_to_js_script_rewriter: ^1.0.1 transformers: diff --git a/public/docs/_examples/toh-5/dart/pubspec.yaml b/public/docs/_examples/toh-5/dart/pubspec.yaml index 699cb6bdae..b4df7a6b99 100644 --- a/public/docs/_examples/toh-5/dart/pubspec.yaml +++ b/public/docs/_examples/toh-5/dart/pubspec.yaml @@ -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.16 browser: ^0.10.0 dart_to_js_script_rewriter: ^1.0.1 transformers: diff --git a/public/docs/_examples/user-input/dart/pubspec.yaml b/public/docs/_examples/user-input/dart/pubspec.yaml index c069b15ffa..7f4fd9f312 100644 --- a/public/docs/_examples/user-input/dart/pubspec.yaml +++ b/public/docs/_examples/user-input/dart/pubspec.yaml @@ -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.16 browser: ^0.10.0 dart_to_js_script_rewriter: ^1.0.1 transformers: diff --git a/public/docs/dart/latest/_data.json b/public/docs/dart/latest/_data.json index fd4b2229cd..4ff984ba64 100644 --- a/public/docs/dart/latest/_data.json +++ b/public/docs/dart/latest/_data.json @@ -3,7 +3,7 @@ "icon": "home", "title": "Angular Docs", "menuTitle": "Docs Home", - "banner": "Welcome to angular.io/dart! The current Angular 2 release is beta.15. Consult the Change Log about recent enhancements, fixes, and breaking changes." + "banner": "Welcome to angular.io/dart! The current Angular 2 release is beta.16. Consult the Change Log about recent enhancements, fixes, and breaking changes." }, "quickstart": { diff --git a/public/docs/dart/latest/quickstart.jade b/public/docs/dart/latest/quickstart.jade index 3d17db49c6..9a0d0100a5 100644 --- a/public/docs/dart/latest/quickstart.jade +++ b/public/docs/dart/latest/quickstart.jade @@ -41,7 +41,7 @@ p. specify the angular2 and browser packages as dependencies, as well as the angular2 transformer. Angular 2 is still changing, so provide an exact version: - 2.0.0-beta.15. + 2.0.0-beta.16. +makeExample('quickstart/dart/pubspec.yaml', 'no-rewriter', 'pubspec.yaml')