Skip to content
This repository was archived by the owner on Dec 4, 2017. It is now read-only.

Commit ff20b55

Browse files
chalinthso
authored andcommitted
chore(dart & ts): update to beta.17
Change `ngFor=“#…”` to `ngFor=“let…` in code. All are .dart files except for `app_component.html` which also has changes for: - `<inpuf var-foo…`> to `<input ref-foo…>` - `#docregion` tag name updates from var-foo to ref-foo. - Other misc updates to minimize diffs with TS version of file, whitespace differences were ignored. + Minor update to sync up Dart prose with TS prose. + Used https://github.com/angular/angular/wiki/Angular-2-Dart-Transformer#resol ved_identifiers to solve #1033 Guide/pipes not updated as it will be rolled back to beta.15 in PR #1220.
1 parent d313e1f commit ff20b55

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+133
-149
lines changed

public/docs/_examples/architecture/dart/pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ version: 0.0.1
55
environment:
66
sdk: '>=1.13.0 <2.0.0'
77
dependencies:
8-
angular2: 2.0.0-beta.16
8+
angular2: 2.0.0-beta.17
99
browser: ^0.10.0
1010
dart_to_js_script_rewriter: ^1.0.1
1111
transformers:

public/docs/_examples/attribute-directives/dart/pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ version: 0.0.1
55
environment:
66
sdk: '>=1.13.0 <2.0.0'
77
dependencies:
8-
angular2: 2.0.0-beta.16
8+
angular2: 2.0.0-beta.17
99
browser: ^0.10.0
1010
dart_to_js_script_rewriter: ^1.0.1
1111
transformers:

public/docs/_examples/dependency-injection/dart/lib/heroes/hero_list_component.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import 'hero_service.dart';
77
@Component(
88
selector: 'hero-list',
99
template: '''
10-
<div *ngFor="#hero of heroes">
10+
<div *ngFor="let hero of heroes">
1111
{{hero.id}} - {{hero.name}}
1212
({{hero.isSecret ? 'secret' : 'public'}})
1313
</div>''')

public/docs/_examples/dependency-injection/dart/lib/heroes/hero_list_component_1.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import 'mock_heroes.dart';
77
@Component(
88
selector: 'hero-list',
99
template: '''
10-
<div *ngFor="#hero of heroes">
10+
<div *ngFor="let hero of heroes">
1111
{{hero.id}} - {{hero.name}}
1212
</div>''')
1313
class HeroListComponent {

public/docs/_examples/dependency-injection/dart/lib/heroes/hero_list_component_2.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import 'hero_service.dart';
77
@Component(
88
selector: 'hero-list',
99
template: '''
10-
<div *ngFor="#hero of heroes">
10+
<div *ngFor="let hero of heroes">
1111
{{hero.id}} - {{hero.name}}
1212
</div>''')
1313
class HeroListComponent {

public/docs/_examples/dependency-injection/dart/pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ version: 0.0.1
55
environment:
66
sdk: '>=1.13.0 <2.0.0'
77
dependencies:
8-
angular2: 2.0.0-beta.16
8+
angular2: 2.0.0-beta.17
99
browser: ^0.10.0
1010
dart_to_js_script_rewriter: ^1.0.1
1111
transformers:

public/docs/_examples/displaying-data/dart/lib/app_component.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ final List<Hero> _heroes = [
1717
<h2>My favorite hero is: {{myHero.name}}</h2>
1818
<p>Heroes:</p>
1919
<ul>
20-
<li *ngFor="#hero of heroes">
20+
<li *ngFor="let hero of heroes">
2121
{{ hero.name }}
2222
</li>
2323
</ul>

public/docs/_examples/displaying-data/dart/lib/app_component_2.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const List<String> _heroes = const [
1919
<p>Heroes:</p>
2020
<ul>
2121
// #docregion li-repeater
22-
<li *ngFor="#hero of heroes">
22+
<li *ngFor="let hero of heroes">
2323
{{ hero }}
2424
</li>
2525
// #enddocregion li-repeater

public/docs/_examples/displaying-data/dart/lib/app_component_3.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ final List<Hero> _heroes = [
1919
<h2>My favorite hero is: {{myHero.name}}</h2>
2020
<p>Heroes:</p>
2121
<ul>
22-
<li *ngFor="#hero of heroes">
22+
<li *ngFor="let hero of heroes">
2323
{{ hero.name }}
2424
</li>
2525
</ul>'''

public/docs/_examples/displaying-data/dart/pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ version: 0.0.1
55
environment:
66
sdk: '>=1.13.0 <2.0.0'
77
dependencies:
8-
angular2: 2.0.0-beta.16
8+
angular2: 2.0.0-beta.17
99
browser: ^0.10.0
1010
dart_to_js_script_rewriter: ^1.0.1
1111
transformers:

public/docs/_examples/forms/dart/pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ version: 0.0.1
55
environment:
66
sdk: '>=1.13.0 <2.0.0'
77
dependencies:
8-
angular2: 2.0.0-beta.16
8+
angular2: 2.0.0-beta.17
99
browser: ^0.10.0
1010
dart_to_js_script_rewriter: ^1.0.1
1111
transformers:

public/docs/_examples/hierarchical-dependency-injection/dart/lib/heroes_list_component.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import 'heroes_service.dart';
1212
template: '''
1313
<div>
1414
<ul>
15-
<li *ngFor="#editItem of heroes">
15+
<li *ngFor="let editItem of heroes">
1616
<hero-card
1717
[hidden]="editItem.editing"
1818
[hero]="editItem.item">

public/docs/_examples/hierarchical-dependency-injection/dart/pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ version: 0.0.1
55
environment:
66
sdk: '>=1.13.0 <2.0.0'
77
dependencies:
8-
angular2: 2.0.0-beta.16
8+
angular2: 2.0.0-beta.17
99
browser: ^0.10.0
1010
dart_to_js_script_rewriter: ^1.0.1
1111
transformers:

public/docs/_examples/lifecycle-hooks/dart/lib/after_content_parent.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ class AfterContentComponent
7676
</after-content>
7777
7878
<h4>-- Lifecycle Hook Log --</h4>
79-
<div *ngFor="#msg of hookLog">{{msg}}</div>
79+
<div *ngFor="let msg of hookLog">{{msg}}</div>
8080
</div>
8181
''',
8282
styles: const [

public/docs/_examples/lifecycle-hooks/dart/lib/after_view_component.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import 'logger_service.dart';
1818
</div>
1919
2020
<h4>-- Lifecycle Hook Log --</h4>
21-
<div *ngFor="#msg of hookLog">{{msg}}</div>
21+
<div *ngFor="let msg of hookLog">{{msg}}</div>
2222
</div>
2323
''',
2424
styles: const [

public/docs/_examples/lifecycle-hooks/dart/lib/counter_component.dart

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import 'spy_directive.dart';
1111
Counter = {{counter}}
1212
1313
<h5>-- Counter Change Log --</h5>
14-
<div *ngFor="#chg of changeLog" mySpy>{{chg}}</div>
14+
<div *ngFor="let chg of changeLog" mySpy>{{chg}}</div>
1515
</div>
1616
''',
1717
styles: const [
@@ -49,7 +49,7 @@ class MyCounter implements OnChanges {
4949
<my-counter [counter]="value"></my-counter>
5050
5151
<h4>-- Spy Lifecycle Hook Log --</h4>
52-
<div *ngFor="#msg of spyLog">{{msg}}</div>
52+
<div *ngFor="let msg of spyLog">{{msg}}</div>
5353
</div>
5454
''',
5555
styles: const [

public/docs/_examples/lifecycle-hooks/dart/lib/on_changes_component.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class Hero {
1717
<p>{{hero.name}} can {{power}}</p>
1818
1919
<h4>-- Change Log --</h4>
20-
<div *ngFor="#chg of changeLog">{{chg}}</div>
20+
<div *ngFor="let chg of changeLog">{{chg}}</div>
2121
</div>
2222
''',
2323
styles: const [

public/docs/_examples/lifecycle-hooks/dart/lib/peek_a_boo_parent_component.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import 'peek_a_boo_component.dart';
1919
</peek-a-boo>
2020
2121
<h4>-- Lifecycle Hook Log --</h4>
22-
<div *ngFor="#msg of hookLog">{{msg}}</div>
22+
<div *ngFor="let msg of hookLog">{{msg}}</div>
2323
</div>
2424
''',
2525
styles: const [

public/docs/_examples/lifecycle-hooks/dart/lib/spy_component.dart

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ import 'spy_directive.dart';
1515
<button (click)="reset()">Reset Heroes</button>
1616
1717
<p></p>
18-
<div *ngFor="#hero of heroes" mySpy class="heroes">
18+
<div *ngFor="let hero of heroes" mySpy class="heroes">
1919
{{hero}}
2020
</div>
2121
2222
<h4>-- Spy Lifecycle Hook Log --</h4>
23-
<div *ngFor="#msg of spyLog">{{msg}}</div>
23+
<div *ngFor="let msg of spyLog">{{msg}}</div>
2424
</div>
2525
''',
2626
styles: const [

public/docs/_examples/lifecycle-hooks/dart/pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ version: 0.0.1
55
environment:
66
sdk: '>=1.13.0 <2.0.0'
77
dependencies:
8-
angular2: 2.0.0-beta.16
8+
angular2: 2.0.0-beta.17
99
browser: ^0.10.0
1010
dart_to_js_script_rewriter: ^1.0.1
1111
transformers:

public/docs/_examples/quickstart/dart/pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ version: 0.0.1
77
environment:
88
sdk: '>=1.13.0 <2.0.0'
99
dependencies:
10-
angular2: 2.0.0-beta.16
10+
angular2: 2.0.0-beta.17
1111
browser: ^0.10.0
1212
# #enddocregion no-rewriter
1313
dart_to_js_script_rewriter: ^1.0.1

public/docs/_examples/server-communication/dart/lib/toh/hero_list_component.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import 'hero_service.dart';
1212
template: '''
1313
<h3>Heroes:</h3>
1414
<ul>
15-
<li *ngFor="#hero of heroes">
15+
<li *ngFor="let hero of heroes">
1616
{{hero.name}}
1717
</li>
1818
</ul>

public/docs/_examples/server-communication/dart/lib/wiki/wiki_component.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import 'wikipedia_service.dart';
1212
<p><i>Fetches after each keystroke</i></p>
1313
<input #term (keyup)="search(term.value)"/>
1414
<ul>
15-
<li *ngFor="#item of items">{{item}}</li>
15+
<li *ngFor="let item of items">{{item}}</li>
1616
</ul>
1717
''',
1818
providers: const [WikipediaService])

public/docs/_examples/server-communication/dart/lib/wiki/wiki_smart_component.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import 'wikipedia_service.dart';
1212
1313
<input #term (keyup)="search(term.value)"/>
1414
<ul>
15-
<li *ngFor="#item of items">{{item}}</li>
15+
<li *ngFor="let item of items">{{item}}</li>
1616
</ul>
1717
''',
1818
providers: const [WikipediaService])

public/docs/_examples/server-communication/dart/pubspec.yaml

+3-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ version: 0.0.1
55
environment:
66
sdk: '>=1.13.0 <2.0.0'
77
dependencies:
8-
angular2: 2.0.0-beta.6
8+
angular2: 2.0.0-beta.17
99
browser: ^0.10.0
1010
dart_to_js_script_rewriter: ^1.0.1
1111
http: ^0.11.3+3
@@ -17,4 +17,6 @@ transformers:
1717
platform_directives: 'package:angular2/common.dart#CORE_DIRECTIVES'
1818
platform_pipes: 'package:angular2/common.dart#COMMON_PIPES'
1919
entry_points: 'web/main.dart'
20+
resolved_identifiers:
21+
BrowserClient: 'package:http/browser_client.dart'
2022
- dart_to_js_script_rewriter

public/docs/_examples/structural-directives/dart/pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ version: 0.0.1
55
environment:
66
sdk: '>=1.13.0 <2.0.0'
77
dependencies:
8-
angular2: 2.0.0-beta.16
8+
angular2: 2.0.0-beta.17
99
browser: ^0.10.0
1010
dart_to_js_script_rewriter: ^1.0.1
1111
transformers:

public/docs/_examples/template-syntax/dart/lib/app_component.html

+16-15
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ <h3>Result: {{currentHero.firstName}}</h3>
410410
<a class="to-toc" href="#toc">top</a>
411411

412412
<!-- NgStyle binding -->
413-
<hr><h2>NgStyle Binding</h2>
413+
<hr><h2 id="ngStyle">NgStyle Binding</h2>
414414

415415
<!-- #docregion NgStyle-1 -->
416416
<div [style.font-size]="isSpecial ? 'x-large' : 'smaller'" >
@@ -633,12 +633,11 @@ <h3>*ngFor expansion</h3>
633633

634634
<p><i>expand to template = "..."</i></p>
635635
<div class="box">
636-
<!-- *ngFor w/ hero-detail Component and a template "attribute" directive -->
636+
<!-- ngFor w/ hero-detail Component and a template "attribute" directive -->
637637
<!-- #docregion Template-3 -->
638638
<hero-detail template="ngFor let hero of heroes; trackBy:trackByHeroes" [hero]="hero"></hero-detail>
639639
<!-- #enddocregion Template-3 -->
640640
</div>
641-
<br>
642641

643642
<p><i>expand to &lt;template&gt;</i></p>
644643
<div class="box">
@@ -655,31 +654,31 @@ <h3>*ngFor expansion</h3>
655654
<!-- template local variable -->
656655
<hr><h2 id="local-vars">Template local variables</h2>
657656

658-
<!-- #docregion var-phone -->
657+
<!-- #docregion ref-phone -->
659658
<!-- phone refers to the input element; pass its `value` to an event handler -->
660659
<input #phone placeholder="phone number">
661660
<button (click)="callPhone(phone.value)">Call</button>
662661

663662
<!-- fax refers to the input element; pass its `value` to an event handler -->
664-
<input var-fax placeholder="phone number">
663+
<input ref-fax placeholder="fax number">
665664
<button (click)="callFax(fax.value)">Fax</button>
666-
<!-- #enddocregion var-phone -->
665+
<!-- #enddocregion ref-phone -->
667666

668667
<h4>Example Form</h4>
669-
<!-- #docregion var-form -->
670-
<!-- #docregion var-form-a -->
668+
<!-- #docregion ref-form -->
669+
<!-- #docregion ref-form-a -->
671670
<form (ngSubmit)="onSubmit(theForm)" #theForm="ngForm">
672-
<!-- #enddocregion var-form-a -->
671+
<!-- #enddocregion ref-form-a -->
673672
<div class="form-group">
674673
<label for="name">Name</label>
675-
<input id="name" class="form-control" required ngControl="firstName"
674+
<input class="form-control" required ngControl="firstName"
676675
[(ngModel)]="currentHero.firstName">
677676
</div>
678-
<!-- #docregion var-form-a -->
677+
<!-- #docregion ref-form-a -->
679678
<button type="submit" [disabled]="!theForm.form.valid">Submit</button>
680679
</form>
681-
<!-- #enddocregion var-form-a -->
682-
<!-- #enddocregion var-form -->
680+
<!-- #enddocregion ref-form-a -->
681+
<!-- #enddocregion ref-form -->
683682
<br><br>
684683

685684
<!-- btn refers to the button element; show its disabled state -->
@@ -783,16 +782,18 @@ <h4>Example Form</h4>
783782
</div>
784783

785784

785+
<a class="to-toc" href="#toc">top</a>
786+
786787
<!-- Todo: discuss this in the Style binding section -->
787788
<!-- enums in bindings -->
788-
<!--
789+
789790
<hr><h2 id="enums">Enums in binding</h2>
790791

792+
<!--<p>The name of the Color.red enum is {{color}}</p>-->
791793
<p>The current color number is {{color}}</p>
792794
<p><button [style.color]="color.toString()" (click)="colorToggle()">Enum Toggle</button>
793795

794796
<a class="to-toc" href="#toc">top</a>
795-
-->
796797

797798
<!-- #docregion my-first-app -->
798799
<h3>My First Angular Application</h3>

public/docs/_examples/template-syntax/dart/pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ version: 0.0.1
55
environment:
66
sdk: '>=1.13.0 <2.0.0'
77
dependencies:
8-
angular2: 2.0.0-beta.16
8+
angular2: 2.0.0-beta.17
99
browser: ^0.10.0
1010
dart_to_js_script_rewriter: ^1.0.1
1111
transformers:

public/docs/_examples/toh-1/dart/pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ version: 0.0.1
44
environment:
55
sdk: '>=1.13.0 <2.0.0'
66
dependencies:
7-
angular2: 2.0.0-beta.16
7+
angular2: 2.0.0-beta.17
88
browser: ^0.10.0
99
dart_to_js_script_rewriter: ^1.0.1
1010
transformers:

public/docs/_examples/toh-2/dart/lib/app_component.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class Hero {
1414
<h1>{{title}}</h1>
1515
<h2>My Heroes</h2>
1616
<ul class="heroes">
17-
<li *ngFor="#hero of heroes"
17+
<li *ngFor="let hero of heroes"
1818
[class.selected]="hero == selectedHero"
1919
(click)="onSelect(hero)">
2020
<span class="badge">{{hero.id}}</span> {{hero.name}}

public/docs/_examples/toh-2/dart/pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ version: 0.0.1
33
environment:
44
sdk: '>=1.13.0 <2.0.0'
55
dependencies:
6-
angular2: 2.0.0-beta.16
6+
angular2: 2.0.0-beta.17
77
browser: ^0.10.0
88
dart_to_js_script_rewriter: ^1.0.1
99
transformers:

public/docs/_examples/toh-3/dart/lib/app_component.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import 'hero_detail_component.dart';
1515
<h1>{{title}}</h1>
1616
<h2>My Heroes</h2>
1717
<ul class="heroes">
18-
<li *ngFor="#hero of heroes"
18+
<li *ngFor="let hero of heroes"
1919
[class.selected]="hero == selectedHero"
2020
(click)="onSelect(hero)">
2121
<span class="badge">{{hero.id}}</span> {{hero.name}}

public/docs/_examples/toh-3/dart/pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ version: 0.0.1
33
environment:
44
sdk: '>=1.13.0 <2.0.0'
55
dependencies:
6-
angular2: 2.0.0-beta.16
6+
angular2: 2.0.0-beta.17
77
browser: ^0.10.0
88
dart_to_js_script_rewriter: ^1.0.1
99
transformers:

0 commit comments

Comments
 (0)