docs(toh-pt5/dart): remove an already existing line (#2056)
Remove an import statement as the package is already imported at this stage of the tutorial.
This commit is contained in:
parent
1ae7b31f61
commit
c8cc3226cc
|
@ -400,9 +400,9 @@ code-example(format='').
|
|||
We import the `HeroService`so we can fetch a hero.
|
||||
+makeExample('toh-5/dart/lib/hero_detail_component.dart', 'import-hero-service')(format=".")
|
||||
:marked
|
||||
We import the `OnInit` interface because we'll call the `HeroService` inside the `ngOnInit` component lifecycle hook.
|
||||
+makeExample('toh-5/dart/lib/hero_detail_component.dart', 'import-oninit')(format=".")
|
||||
:marked
|
||||
We use the `OnInit` interface from the already imported `angular2/core.dart` package because we'll
|
||||
call the `HeroService` inside the `ngOnInit` component lifecycle hook.
|
||||
|
||||
We inject both the `RouteParams` service and the `HeroService` into the constructor as we've done before,
|
||||
making private variables for both:
|
||||
+makeExample('toh-5/dart/lib/hero_detail_component.dart', 'ctor', 'lib/hero_detail_component.dart (constructor)')(format=".")
|
||||
|
|
Loading…
Reference in New Issue