File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
public/docs/dart/latest/tutorial Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -400,9 +400,9 @@ code-example(format='').
400400 We import the `HeroService`so we can fetch a hero.
401401+ makeExample('toh-5/dart/lib/hero_detail_component.dart' , 'import-hero-service' )( format ="." )
402402:marked
403- We import the `OnInit` interface because we'll call the `HeroService` inside the `ngOnInit` component lifecycle hook.
404- + makeExample( 'toh-5/dart/lib/hero_detail_component.dart' , 'import-oninit' ) ( format = "." )
405- : marked
403+ We use the `OnInit` interface from the already imported `angular2/core.dart` package because we'll
404+ call the `HeroService` inside the `ngOnInit` component lifecycle hook.
405+
406406 We inject both the `RouteParams` service and the `HeroService` into the constructor as we've done before,
407407 making private variables for both:
408408+ makeExample('toh-5/dart/lib/hero_detail_component.dart' , 'ctor' , 'lib/hero_detail_component.dart (constructor)' )( format ="." )
You can’t perform that action at this time.
0 commit comments