When form is posted, I want to get selected item Name and Value both of an ngSelect dropdown in angular 6.
I have tried getting it with ngModel and with templateVariable, but Selected Name is not returned, I only managed to get Selected Value.
<ng-select
name="testFunctionID"
[items]="testFunctions"
[multiple]="false"
bindLabel="name"
bindValue="testFunctionID"
[(ngModel)]="model.testFunctionID">
</ng-select>
For a list shown in dropdown {Mumbai :1}, {Pune: 2}, {Delhi: 3}, if I select Pune, then I should get "Pune" as well as "2" as output json.