projects
/
examples
/
angular-tour-of-heroes
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f6721b5
)
@Input() is no longer needed in HeroDetailComponent
author
Kai Moritz
<kai@juplo.de>
Mon, 11 May 2020 15:38:38 +0000
(17:38 +0200)
committer
Kai Moritz
<kai@juplo.de>
Mon, 11 May 2020 16:23:16 +0000
(18:23 +0200)
* The displayed hero is fetched throught the HeroService now!
src/app/hero-detail/hero-detail.component.ts
patch
|
blob
|
history
diff --git
a/src/app/hero-detail/hero-detail.component.ts
b/src/app/hero-detail/hero-detail.component.ts
index
aef0da5
..
d4c7289
100644
(file)
--- a/
src/app/hero-detail/hero-detail.component.ts
+++ b/
src/app/hero-detail/hero-detail.component.ts
@@
-1,4
+1,4
@@
-import { Component, OnInit
, Input
} from '@angular/core';
+import { Component, OnInit } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { Location } from '@angular/common';
@@
-12,7
+12,7
@@
import { Hero } from '../hero';
})
export class HeroDetailComponent implements OnInit {
-
@Input() hero
: Hero;
+
hero
: Hero;
constructor(
private route: ActivatedRoute,