locked
How to check in component.html if column type=1 display label text Active else display Not active ? RRS feed

  • Question

  • User696604810 posted

    I have object name ReportControl I face issue I cannot check value related to this object

    if have column type 1 then display label active else display label not active on reportcomponent.html

    data of object ReportControl as below

    {"reportId":2028,"fieldName":"offilneURL","reportStatus":"HiddenColumn","columnType":1}



    on reportcomponent.ts

    this._displayreport.GetReportControl(param2).subscribe((res: any) => {
    this.ReportControl = res;
    console.log("report control is" + JSON.stringify(this.ReportControl) );
    
    });



    on service.ts

    GetReportControl(id : string){
    return this.http.get<any[]>(this.url+ 'report/GetAllReportControl/id=' + id)
    .map(res=>res);
    
    }



    reportcomponent.html

    i need to check if column type =1 then display label with text active
    else display label with text not active

    Thursday, May 21, 2020 7:48 AM

All replies

  • User303363814 posted

    All your other questions seem to show that you are already doing this sort of thing ...

    <div *ngIf="columnType=='1'">Wow It is One!</div>

    <div *ngIf="columnType!='1'">Sad. I would have liked a one</div>

    Thursday, May 28, 2020 5:09 AM