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

docs(tutorial): add dart version of toh tutorial #700

Closed
wants to merge 6 commits into from

Conversation

kasperpeulen
Copy link
Contributor

@kwalrath in this PR, I just focused on getting the Dart version up to date with the typescript version

In the other PR I ported the end result to dart, but it seems like this code was only used for plnkr, or maybe it will be used for the last part (toh-pt5), but this is not yet done for typescript it seems.

private engine: Engine;
private tires: Tires;

constructor() {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be Tires instead of constructor

@kasperpeulen
Copy link
Contributor Author

Oh oopz @zoechi I have only converted toh-1 up to toh-4 to dart.

I first just copied all the ts source files from the ts directory to the dart directory ,but I think the files about DI (dependency injection) shouldn't actually be here, so I removed them now (should probably also removed from the ts source).

Also toh-5 is not converted, because the ts version is not yet finished.

<h2>My Heroes</h2>
<ul class="heroes">
<li *ngFor="#hero of heroes"
[class.selected]="hero === selectedHero"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

=== not valid Dart

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks, fixed, (will push later)

@zoechi
Copy link

zoechi commented Jan 14, 2016

The toh-pt5.jade file is still included, is this intentional?

<h2>My Heroes</h2>
<ul class="heroes">
<li *ngFor="#hero of heroes"
[class.selected]="hero === selectedHero"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TS ===

@kasperpeulen
Copy link
Contributor Author

@zoechi I removed that file as well now, and fixed the other comments.

// #docregion getHeroes
getHeroes() {
//#docregion get-heroes
heroes = _heroService.getHeroes();
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't this use async / await ?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is ok, it uses hero_service_1.dart where the value is returned sync.

@zoechi
Copy link

zoechi commented Jan 15, 2016

I did just a shallow review but now LGTM

@kwalrath kwalrath self-assigned this Mar 16, 2016
@kwalrath
Copy link
Contributor

kwalrath commented Apr 6, 2016

Taking a very belated look now...

@kwalrath
Copy link
Contributor

kwalrath commented Apr 6, 2016

@kasperpeulen could you please git rebase upstream/master, resolve any conflicts, and push? If that's not practical, I guess we should start a new PR.

You can rename your .jade files to *-NEW.jade to get around some of the conflicts. And just drop the _data.json changes.

@kwalrath
Copy link
Contributor

kwalrath commented Apr 8, 2016

Just FYI, I'm copying down the toh-1 code to submit in a separate PR.

kwalrath added a commit to kwalrath/angular.io that referenced this pull request Apr 14, 2016
@kwalrath
Copy link
Contributor

Closing, now that all changes have gotten into merged PRs. Thank you, @kasperpeulen!

@kwalrath kwalrath closed this May 19, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants