thanks much!

On Monday, November 21, 2016 at 5:25:47 AM UTC-8, Patrice Chalin wrote:
>
> Hi Eric,
>
> Sorry about those errors, and thanks for your post. Both the ToH-5 and 6 
> have been fixed in this PR: 
> https://github.com/angular/angular.io/pull/2846
> The the dashboard router link was updated to [routerLink]="['HeroDetail', 
> {id: hero.id.toString()}]", solving both the issues you mention. This 
> update should be pushed to the site shortly.
>
> Patrice
>
> On Sunday, November 20, 2016 at 9:00:12 PM UTC-8, Eric Hackborn wrote:
>>
>> And one final comment on this, with the dashboard working, it seems that 
>> the data arriving in the hero detail is different -- it's an int when it 
>> should be a string (in fact, I believe the docs say the result of 
>> routeParams.get() is always a string, which is not what I'm seeing).
>>
>> So to get the whole thing fully working, I had to replace 
>> hero_detail_component.dart:
>>
>>   Future<Null> ngOnInit() async {
>>     var idString = _routeParams.get('id');
>>     var id = int.parse(idString ?? '', onError: (_) => null);
>>     if (id != null) hero = await (_heroService.getHero(id));
>>   }
>>
>> with
>>
>>   Future<Null> ngOnInit() async {
>>     var idString = _routeParams.get('id');
>>     var id = null;
>>     if (idString is int) {
>>       id = idString;
>>     } else {
>>       id = int.parse(idString ?? '', onError: (_) => null);
>>     }
>>     if (id != null) hero = await (_heroService.getHero(id));
>>   }
>>
>> and I'm sure there's a cleaner way to do that.
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"angular-dart" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to angular-dart+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/angular-dart.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/angular-dart/74236f33-ef6d-4695-9a63-3de0e59486e5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to