-
Notifications
You must be signed in to change notification settings - Fork 875
docs(tutorial): add dart version of toh tutorial #693
Conversation
HeroDetailComponent(this._heroService, this._routeParams); | ||
|
||
ngOnInit() async { | ||
int id = _routeParams.params['id'] as int; |
There was a problem hiding this comment.
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
.
There was a problem hiding this comment.
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()
@sanfordredlich could you please take a look? |
import 'package:angular2/core.dart'; | ||
import 'package:angular2/router.dart'; | ||
|
||
import 'heroes_component.dart'; |
There was a problem hiding this comment.
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?
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. |
It seems like I messed this PR up, see #700 for the new PR |
FYI: @kasperpeulen you can always Do you want me to close this one? |
@kevmoo ah that is a nice trick! okay, closing this |
@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.