diff --git a/public/docs/_examples/toh-5/dart/lib/dashboard_component.html b/public/docs/_examples/toh-5/dart/lib/dashboard_component.html index f48c102949..56779ce130 100644 --- a/public/docs/_examples/toh-5/dart/lib/dashboard_component.html +++ b/public/docs/_examples/toh-5/dart/lib/dashboard_component.html @@ -2,7 +2,7 @@

Top Heroes

- +

{{hero.name}}

diff --git a/public/docs/_examples/toh-5/dart/lib/hero_detail_component.dart b/public/docs/_examples/toh-5/dart/lib/hero_detail_component.dart index df03c092f3..6a344362ca 100644 --- a/public/docs/_examples/toh-5/dart/lib/hero_detail_component.dart +++ b/public/docs/_examples/toh-5/dart/lib/hero_detail_component.dart @@ -37,15 +37,13 @@ class HeroDetailComponent implements OnInit { // #docregion ngOnInit Future ngOnInit() async { - var idString = _routeParams.get('id'); - var id = int.parse(idString ?? '', onError: (_) => null); + var _id = _routeParams.get('id'); + var id = int.parse(_id ?? '', onError: (_) => null); if (id != null) hero = await (_heroService.getHero(id)); } // #enddocregion ngOnInit // #docregion goBack - void goBack() { - _location.back(); - } + void goBack() => _location.back(); // #enddocregion goBack } diff --git a/public/docs/_examples/toh-6/dart/lib/dashboard_component.dart b/public/docs/_examples/toh-6/dart/lib/dashboard_component.dart index ac71e10e17..952736be7c 100644 --- a/public/docs/_examples/toh-6/dart/lib/dashboard_component.dart +++ b/public/docs/_examples/toh-6/dart/lib/dashboard_component.dart @@ -13,7 +13,7 @@ import 'hero_search_component.dart'; selector: 'my-dashboard', templateUrl: 'dashboard_component.html', styleUrls: const ['dashboard_component.css'], - directives: const [HeroSearchComponent]) + directives: const [HeroSearchComponent, ROUTER_DIRECTIVES]) // #enddocregion search class DashboardComponent implements OnInit { List heroes; diff --git a/public/docs/_examples/toh-6/dart/lib/dashboard_component.html b/public/docs/_examples/toh-6/dart/lib/dashboard_component.html index db8546ccd2..12ca29d8d1 100644 --- a/public/docs/_examples/toh-6/dart/lib/dashboard_component.html +++ b/public/docs/_examples/toh-6/dart/lib/dashboard_component.html @@ -1,7 +1,7 @@

Top Heroes