I'm working with p-inplace of primeNg. I want to call a function when onDeactivate
is called, using the value of pTemplate content.
code snippet:
<p-inplace [closable]="true" (onDeactivate)="doSomething(???)">
<ng-template pTemplate="display">
<label>xxx</label>
</ng-template>
<ng-template pTemplate="content">
<input type="text" #myInput pInputText [ngModel]="someReadonlyInitialData">
</ng-template>
</p-inpace>
I want to send the value typed into myInput where the ??? are. If it were not in the template, I could send by doSomething(myInput.value)
, but since it is within a template, it is not recognized there.
Does anyone have a solution or a workaround for this?