I want to transfer certain modal properties in this manner
service.confirm = function(message, confirmProperties) {
return $uibModal.open({
templateUrl: 'app/modal/alert/alert.tpl.html',
controller: 'alertController as vm',
size: 'md',
resolve: {
alertData: function() {
return {
message: message,
type: 'QUESTION',
customButtons: confirmProperties.button1 && confirmProperties.button2 ? [confirmProperties.button1, confirmProperties.button2] : undefined,
cancelButton: confirmProperties.cancelButton,
title: confirmProperties.title,
ignoreWhiteSpaces: confirmProperties.ignoreWhiteSpaces
}
}
},
backdrop: true,
keyboard: true
});
};
When I call my function, all properties are passed correctly except for the 'ignoreWhiteSpaces' one... Even when I pass false, it ends up being undefined. Why is that happening? I've spent more than an hour attempting to solve this issue.
var confirmProperties = {
button1: 'Update Existing Contracts',
button2: 'No Update to Existing Contracts',
cancelButton: true,
title: 'Update Service on the Customers Existing Contracts',
ignoreWhiteSpace: false
};
appState.confirm('This is the message.', confirmProperties);