I have web api action method returning chapterid and chaptername. I want to map this to angular class with an extra field of 'Edit' whose default value is false
export class Chapter {
chapterid: number;
chaptername: string;
Edit: boolean = false;
}
public Chapters: any;
this.http.get<Chapter>(this.baseUrl + 'api/Chapters').subscribe((response) => { this.Chapters = response; console.log(this.Chapters); }, error => console.log(error));
I am not getting the extra field 'Edit'.