Having trouble checking the value of an object named ReportControl.
If the column type is 1, display the label "active"; otherwise, display the label "not active" on reportcomponent.html.
The data for the ReportControl object is as follows:
{"reportId":2028,"fieldName":"offilneURL","reportStatus":"HiddenColumn","columnType":1}
In reportcomponent.ts:
this._displayreport.GetReportControl(param2).subscribe((res: any) => {
this.ReportControl = res;
console.log("report control is" + JSON.stringify(this.ReportControl) );
});
In service.ts:
GetReportControl(id : string){
return this.http.get<any[]>(this.url+ 'report/GetAllReportControl/id=' + id)
.map(res=>res);
}
reportcomponent.html:
Need to check if the column type equals 1 to display a label with the text "active", or display a label with the text "not active".
Expected result is to display the label with the text "active".