Ниже кода выдает ошибку при выполнении оператора toastEvent.setParams .Не уверен, что я пропустил или устарел весной 19 года?
loadContacts : function(cmp) {
var action = cmp.get("c.getContacts");
action.setCallback(this, function(response){
var state = response.getState();
if (state === 'SUCCESS') {
cmp.set('v.contacts', response.getReturnValue());
cmp.set('v.contactList', response.getReturnValue());
this.updateTotal(cmp);
}
console.log('Here');
var toastEvent = $A.get("e.force:showToast");
if (state === 'SUCCESS') {
toastEvent.setParams({
"title" : 'Success!',
"message" : 'Your contacts have been loaded successfully.'
});
}
else {
toastEvent.setParams({
"title" : "Error!",
"message" : "Something has gone wrong."
});
}
toastEvent.fire();
});
$A.enqueueAction(action);
},
Вот скриншот ошибки: ![enter image description here](https://i.stack.imgur.com/F18MV.png)