An error occurred while running my code:
[0] app/components/people/details/PersonDetailComponent.ts(27,35): error TS2339: Property 'person' is missing from type '{}'.
Here is the code snippet in question:
export class PersonDetailComponent
{
person: any;
constructor(private _api: Api, private _params: RouteParams)
{
this._api.getPerson(_params.get("id")).then(
(res) => {
//line 27// this.person = res.person;
},
(error) => {
console.error(error);
}
)
}
}