ngOnInit() { let id = this.route.snapshot.paramMap.get('id'); this.hero$ = this.service.getHero(id); }