angular - CurrentValue is changed but ngOnChanges is not firing? -


ngonchanges(changes: simplechanges) {     settimeout(() => {         console.log(changes.output,'adjaslćjkdajklsdajslk');     }, 1000)           this.confing = changes.output.currentvalue;         console.log(changes.output.currentvalue,'aaaaaaaaaa');         // can use categoryid.previousvalue ,          // categoryid.firstchange comparing old , new values         if(this.output['user-activities']){             this.confing = this.output['user-activities'];         }      } 

i change value , in changes.output.currentvalue not firing it.any suggestion?

edit:

in ordervriewcomponent have this:

 getflowtab(ordnum?: any, processcode?: any) {         let path: string = '/uomback/workflowexecutionplan/user-activities';         this.restservice.get(path, { ordnum: ordnum, processcode: processcode }).subscribe(response => {             this.output['user-activities'] = response['payload'];             console.log(this.output,'u order overview');         })     } 

and onchanges im calling in flowtab component. when console.log(changes) first time nothing when populate output , go on object find currentvalue changed not fired

ngonchanges trigger when @input value changes.

if currentvalue input element go reactiveformmodule , create form , subscribe

this.currentvalue.valuechanges.subscribe(() => {   // notified when value changes }); 

Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -