You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
have checked bug reports, nothing covering this issue (although one report corrected text)
Description
Build at: 2021-05-16T10:10:23.359Z - Hash: 37830322103468919099 - Time: 379ms
Error: src/app/hero-detail/hero-detail.component.ts:37:33 - error TS2345: Argument of type 'Hero | undefined' is not assignable to parameter of type 'Hero'.
Type 'undefined' is not assignable to type 'Hero'.
export class HeroDetailComponent implements OnInit {
...
save(): void {
// there is an error here (this.hero) that is not understood
// @see https://angular.io/tutorial/toh-pt6
this.heroService.updateHero(this.hero)
.subscribe(() => this.goBack());
}
...
for now, cannot "update" the hero name. have commented out the updateHero() for now... (I believe you that it works...)
Reproduction Steps**
am following the demo process
Expected vs Actual Behavior**
Your Environment
win10pro, opera v75
Anything else relevant?
following the demo using latest npm v12 angular stuff
Activity
JoostK commentedon May 16, 2021
This is being addressed in #41999.
JoostK commentedon May 17, 2021
Closing this as #41999 was merged.
angular-automatic-lock-bot commentedon Jun 17, 2021
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.