No código abaixo aparece um erro dentro do ngOnInit na linha " this.photo$ = this.photoService.findById(this.photoId);" O erro é dentro do parênteses e aparece a mensagem: Argument of type 'number' is not assignable to parameter of type 'string'.ts(2345)
export class PhotoDetailsComponent implements OnInit {
photo$: Observable<Photo>;
photoId: number;
constructor(
private route: ActivatedRoute,
private photoService: PhotoService
) {}
ngOnInit(): void {
this.photoId = this.route.snapshot.params.photoId;
this.photo$ = this.photoService.findById(this.photoId);
}
}