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 #693

Closed
wants to merge 15 commits into from

Conversation

kasperpeulen
Copy link
Contributor

@kwalrath This is only the end result, and only the source code of the tour of heroes tutorial.

It seems like the ts version of toh-1 up to toh-5 are not in sync with the end result yet. So I haven't ported those.

HeroDetailComponent(this._heroService, this._routeParams);

ngOnInit() async {
int id = _routeParams.params['id'] as int;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

For some reason angular2 assumes that this must be a String, but it is actually an int.

Copy link

Choose a reason for hiding this comment

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

I think you should ensure only strings are used in route parameters. If you navigate by clicking a bookmark you'll get a string not an int. I'm on the phone which makes reading cumbersome but i think it's cause by gotoDetail() where an int is passesd to navigate()

@kwalrath
Copy link
Contributor

@sanfordredlich could you please take a look?

import 'package:angular2/core.dart';
import 'package:angular2/router.dart';

import 'heroes_component.dart';
Copy link

Choose a reason for hiding this comment

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

Are relative imports ok now?

@googlebot
Copy link

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for the commit author(s). If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.

@kasperpeulen
Copy link
Contributor Author

It seems like I messed this PR up, see #700 for the new PR

@kevmoo
Copy link

kevmoo commented Jan 14, 2016

FYI: @kasperpeulen you can always git push --force to your PR branch if you want to clean things up.

Do you want me to close this one?

@kasperpeulen
Copy link
Contributor Author

@kevmoo ah that is a nice trick!

okay, closing this

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.