I have a custom request payload to get api response in an ember-bootstrap-modal. Now I want to add another toggle button "show/hide" which should add/remove keys to my request payload object on click of it. How can I do that?
X.js :
let reqPayload = {
retrieveFlags: {
childFare: true,
additionalGuestFare: true,
roundUpFare: true,
averageFare: true
}
}
y.hbs:
<button>Show</button>
on click retrieveFlags should be
let reqPayload = {
retrieveFlags: {
childFare: true,
additionalGuestFare: true,
roundUpFare: true,
averageFare: true,
refundableFare: true,
nonRefundableDepositFare: true,
nonRefundableFare: true,
}
}
Aucun commentaire:
Enregistrer un commentaire