JSFiddle - React, Tailwind, and code Playground

by Harold

JavaScript

if(this.processedPlan.linkToData){
            this.ihrService.getDocumentUrlIdData(this.processedPlan.linkToData).subscribe(
                // (plan) =>{this.plan = plan},        // todo just for test activate line
                (plan) => {var that = this; setTimeout(() => {that.plan = plan; console.log('plan assigned .. plan: ');
                    console.log(that.plan)}, 5000)},    // todo just for test delete line
                (error)=>{},
                // ()=>{this.getDocumentData();}
                ()=>{var that = this; setTimeout(() => {that.getDocumentData()}, 5000);}
            );

        }else {
            this.plan = <IhrPlan> this.processedPlan.planData;
            this.getDocumentData();
        }